[SDK] Support CMake option for using internal RCCL tracing + (temporary) enable in CI (#457)
* Temp: disable RCCL tracing * Update continuous_integration.yml * Update continuous_integration.yml * Update continuous_integration.yml * Adding option to disable rccl tracing from CMake * Update codeql.yml * Misc updates - ROCPROFILER_BUILD_RCCL -> ROCPROFILER_INTERNAL_RCCL_API_TRACE - env.EXTRA_TEMP_CMAKE_OPTIONS -> env.GLOBAL_CMAKE_OPTIONS - add (advanced) option ROCPROFILER_INTERNAL_RCCL_API_TRACE * Fix rocprofiler::sdk::get_enum_label - missing enum labels for HIP_RUNTIME_API_TABLE_STEP_VERSION > 8 * Update tests/rocprofv3/advanced-thread-trace/CMakeLists.txt - improve various aspect of cmake -- particularly echoing where attdecoder_LIBRARY was found * Use CMAKE_MESSAGE_INDENT - add prefix to cmake messages to help indicate where messages are coming from - make find_package(Python3 ...) QUIET for bindings * Fix rocprofiler::sdk::get_enum_label - handle HSA_AMD_EXT_API_TABLE_MAJOR_VERSION * Fix rocprofv3 message for att library path * Fix tests/rocprofv3/advanced-thread-trace/att_input.yml config * Fix rocprofv3 check_att_capability + soversion/version library resolution - Account for ROCPROF_ATT_LIBRARY_PATH in env in check_att_capability - Add resolve_library_path - supports resolution of library names to SOVERSION and VERSION paths * Fix python linting error (unused import) --------- Co-authored-by: Ammar ELWazir <aelwazir@amd.com> Co-authored-by: Jonathan R. Madsen <jonathanrmadsen@gmail.com>
This commit is contained in:
@@ -25,11 +25,15 @@
|
||||
#
|
||||
cmake_minimum_required(VERSION 3.21.0 FATAL_ERROR)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
project(
|
||||
rocprofiler-sdk-tests-rocprofv3-att
|
||||
LANGUAGES CXX
|
||||
VERSION 0.0.0)
|
||||
|
||||
set(CMAKE_MESSAGE_INDENT "[${PROJECT_NAME}] ")
|
||||
|
||||
string(REPLACE "LD_PRELOAD=" "--preload;" PRELOAD_ARGS
|
||||
"${ROCPROFILER_MEMCHECK_PRELOAD_ENV}")
|
||||
|
||||
@@ -40,18 +44,23 @@ find_package(rocprofiler-sdk REQUIRED)
|
||||
|
||||
set(IS_DISABLED ON)
|
||||
|
||||
set(LIB_PATH_LOC "${ROCM_PATH}/lib")
|
||||
set(LIB_PATH_ENV "ROCPROF_ATT_LIBRARY_PATH=${LIB_PATH_LOC}")
|
||||
|
||||
find_library(
|
||||
attdecoder
|
||||
HINTS ${LIB_PATH_LOC}
|
||||
attdecoder_LIBRARY
|
||||
NAMES rocprof-trace-decoder
|
||||
HINTS ${ROCM_PATH}
|
||||
PATHS ${ROCM_PATH}
|
||||
PATH_SUFFIXES lib
|
||||
NAMES rocprof-trace-decoder)
|
||||
PATH_SUFFIXES lib)
|
||||
|
||||
if(attdecoder)
|
||||
if(attdecoder_LIBRARY)
|
||||
cmake_path(GET attdecoder_LIBRARY PARENT_PATH attdecoder_LIB_DIR)
|
||||
endif()
|
||||
|
||||
find_package_handle_standard_args(attdecoder REQUIRED_VARS attdecoder_LIB_DIR
|
||||
attdecoder_LIBRARY)
|
||||
|
||||
if(attdecoder_FOUND)
|
||||
set(IS_DISABLED OFF)
|
||||
set(LIB_PATH_ENV "ROCPROF_ATT_LIBRARY_PATH=${attdecoder_LIB_DIR}")
|
||||
endif()
|
||||
|
||||
# hsa multiqueue dependency test with lib path
|
||||
@@ -62,7 +71,7 @@ add_test(
|
||||
1 --att-target-cu 1 --att-shader-engine-mask 0x11 --kernel-include-regex copyD
|
||||
--att-buffer-size 0x6000000 --att-simd-select 0x3 --att-serialize-all 1 -d
|
||||
${CMAKE_CURRENT_BINARY_DIR}/%argt%-trace/cmd_input -o out --output-format json
|
||||
${PRELOAD_ARGS} --att-library-path ${LIB_PATH_LOC} --att-activity 8 --
|
||||
${PRELOAD_ARGS} --att-library-path ${attdecoder_LIB_DIR} --att-activity 8 --
|
||||
$<TARGET_FILE:hsa_code_object_testapp>)
|
||||
|
||||
set_tests_properties(
|
||||
@@ -74,14 +83,14 @@ add_test(
|
||||
NAME rocprofv3-test-hsa-multiqueue-att-json-execute
|
||||
COMMAND
|
||||
$<TARGET_FILE:rocprofiler-sdk::rocprofv3> --log-level env --att-library-path
|
||||
${LIB_PATH_LOC} -d ${CMAKE_CURRENT_BINARY_DIR}/%argt%-trace/json_input -i
|
||||
${attdecoder_LIB_DIR} -d ${CMAKE_CURRENT_BINARY_DIR}/%argt%-trace/json_input -i
|
||||
${CMAKE_CURRENT_BINARY_DIR}/att_input.json ${PRELOAD_ARGS} --
|
||||
$<TARGET_FILE:hsa_code_object_testapp>)
|
||||
|
||||
set_tests_properties(
|
||||
rocprofv3-test-hsa-multiqueue-att-json-execute
|
||||
PROPERTIES TIMEOUT 45 LABELS "integration-tests" DISABLED ${IS_DISABLED} ENVIRONMENT
|
||||
${LIB_PATH_ENV})
|
||||
"${LIB_PATH_ENV}")
|
||||
|
||||
# validate output
|
||||
add_test(
|
||||
@@ -139,7 +148,7 @@ function(configure_att_input _FILENAME _OUTDIR)
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${_FILENAME} @ONLY)
|
||||
endfunction()
|
||||
|
||||
configure_att_input(att_input.yml "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}")
|
||||
configure_att_input(att_input.yml "${attdecoder_LIB_DIR}")
|
||||
configure_att_input(att_input_will_fail.yml "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}")
|
||||
|
||||
# test yaml input
|
||||
@@ -204,7 +213,7 @@ add_test(
|
||||
set_tests_properties(
|
||||
rocprofv3-test-hsa-multiqueue-att-plus-pmc-execute
|
||||
PROPERTIES TIMEOUT 45 LABELS "integration-tests" DISABLED ${IS_DISABLED} ENVIRONMENT
|
||||
${LIB_PATH_ENV})
|
||||
"${LIB_PATH_ENV}")
|
||||
|
||||
# Check for conflict PMC + activity
|
||||
add_test(
|
||||
@@ -223,7 +232,7 @@ set_tests_properties(
|
||||
DISABLED
|
||||
${IS_DISABLED}
|
||||
ENVIRONMENT
|
||||
${LIB_PATH_ENV}
|
||||
"${LIB_PATH_ENV}"
|
||||
WILL_FAIL
|
||||
ON)
|
||||
|
||||
@@ -244,6 +253,6 @@ set_tests_properties(
|
||||
DISABLED
|
||||
${IS_DISABLED}
|
||||
ENVIRONMENT
|
||||
${LIB_PATH_ENV}
|
||||
"${LIB_PATH_ENV}"
|
||||
WILL_FAIL
|
||||
ON)
|
||||
|
||||
Reference in New Issue
Block a user