[ROCm 7.0] [PC sampling] Disable PC sampling tests if the GFX arch doesn't support it (#436)
Disable PC sampling tests if the GFX arch doesn't support it
[ROCm/rocprofiler-sdk commit: a24f486732]
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
bb942ef500
Коммит
e5097d6a36
@@ -49,3 +49,80 @@ function(rocprofiler_sdk_get_gfx_architectures _VAR)
|
||||
endif()
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
# In case the underlying architecture does not support PC sampling, this function will
|
||||
# tell us whether the PC sampling is disabled
|
||||
function(rocprofiler_sdk_pc_sampling_disabled _VAR)
|
||||
cmake_parse_arguments(ARG "ECHO" "PREFIX" "" ${ARGN})
|
||||
|
||||
if(NOT DEFINED ARG_PREFIX)
|
||||
set(ARG_PREFIX "[${PROJECT_NAME}] ")
|
||||
endif()
|
||||
|
||||
rocprofiler_sdk_get_gfx_architectures(rocprofiler-sdk-tests-gfx-info ECHO)
|
||||
list(GET rocprofiler-sdk-tests-gfx-info 0 pc-sampling-gpu-0-gfx-info)
|
||||
|
||||
if("${pc-sampling-gpu-0-gfx-info}" MATCHES "^gfx90a$"
|
||||
OR "${pc-sampling-gpu-0-gfx-info}" MATCHES "^gfx94[0-9]$"
|
||||
OR "${pc-sampling-gpu-0-gfx-info}" MATCHES "^gfx95[0-9]$")
|
||||
# PC sampling is enabled on this architecture.
|
||||
set(${_VAR}
|
||||
FALSE
|
||||
PARENT_SCOPE)
|
||||
if(ARG_ECHO)
|
||||
message(
|
||||
STATUS
|
||||
"${ARG_PREFIX}PC Sampling is enabled for ${pc-sampling-gpu-0-gfx-info}"
|
||||
)
|
||||
endif()
|
||||
else()
|
||||
# PC sampling is disabled on this architecture.
|
||||
set(${_VAR}
|
||||
TRUE
|
||||
PARENT_SCOPE)
|
||||
if(ARG_ECHO)
|
||||
message(
|
||||
STATUS
|
||||
"${ARG_PREFIX}PC Sampling is disabled for ${pc-sampling-gpu-0-gfx-info}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
# In case the underlying architecture does not support stochastic PC sampling, this
|
||||
# function will tell us whether the PC sampling is disabled
|
||||
function(rocprofiler_sdk_pc_sampling_stochastic_disabled _VAR)
|
||||
cmake_parse_arguments(ARG "ECHO" "PREFIX" "" ${ARGN})
|
||||
|
||||
if(NOT DEFINED ARG_PREFIX)
|
||||
set(ARG_PREFIX "[${PROJECT_NAME}] ")
|
||||
endif()
|
||||
|
||||
rocprofiler_sdk_get_gfx_architectures(rocprofiler-sdk-tests-gfx-info ECHO)
|
||||
list(GET rocprofiler-sdk-tests-gfx-info 0 pc-sampling-gpu-0-gfx-info)
|
||||
|
||||
if("${pc-sampling-gpu-0-gfx-info}" MATCHES "^gfx94[0-9]$"
|
||||
OR "${pc-sampling-gpu-0-gfx-info}" MATCHES "^gfx95[0-9]$")
|
||||
# PC sampling is enabled on this architecture.
|
||||
set(${_VAR}
|
||||
FALSE
|
||||
PARENT_SCOPE)
|
||||
if(ARG_ECHO)
|
||||
message(
|
||||
STATUS
|
||||
"${ARG_PREFIX}PC Sampling is enabled for ${pc-sampling-gpu-0-gfx-info}"
|
||||
)
|
||||
endif()
|
||||
else()
|
||||
# PC sampling is disabled on this architecture.
|
||||
set(${_VAR}
|
||||
TRUE
|
||||
PARENT_SCOPE)
|
||||
if(ARG_ECHO)
|
||||
message(
|
||||
STATUS
|
||||
"${ARG_PREFIX}PC Sampling is disabled for ${pc-sampling-gpu-0-gfx-info}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
@@ -47,6 +47,9 @@ target_link_libraries(
|
||||
rocprofiler_samples_get_preload_env(PRELOAD_ENV pc-sampling-client)
|
||||
rocprofiler_samples_get_ld_library_path_env(LIBRARY_PATH_ENV)
|
||||
|
||||
# Check if PC sampling is disabled and whether we should disable the test
|
||||
rocprofiler_sdk_pc_sampling_disabled(IS_PC_SAMPLING_DISABLED)
|
||||
|
||||
set(pc-sampling-env ${PRELOAD_ENV} ${LIBRARY_PATH_ENV})
|
||||
|
||||
add_test(NAME pc-sampling COMMAND $<TARGET_FILE:pc-sampling>)
|
||||
@@ -62,4 +65,6 @@ set_tests_properties(
|
||||
FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}"
|
||||
SKIP_REGULAR_EXPRESSION
|
||||
"PC sampling unavailable")
|
||||
"PC sampling unavailable"
|
||||
DISABLED
|
||||
"${IS_PC_SAMPLING_DISABLED}")
|
||||
|
||||
@@ -61,6 +61,9 @@ target_link_libraries(
|
||||
PRIVATE pc-sampling-integration-test-client Threads::Threads
|
||||
rocprofiler-sdk::tests-build-flags)
|
||||
|
||||
# Check if PC sampling is disabled and whether we should disable the test
|
||||
rocprofiler_sdk_pc_sampling_disabled(IS_PC_SAMPLING_DISABLED)
|
||||
|
||||
add_test(NAME pc-sampling-integration-test
|
||||
COMMAND $<TARGET_FILE:pc-sampling-integration-test>)
|
||||
|
||||
@@ -77,4 +80,6 @@ set_tests_properties(
|
||||
ENVIRONMENT
|
||||
"${pc-sampling-integration-test-env}"
|
||||
FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}")
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}"
|
||||
DISABLED
|
||||
"${IS_PC_SAMPLING_DISABLED}")
|
||||
|
||||
+21
-6
@@ -8,6 +8,9 @@ project(
|
||||
LANGUAGES CXX
|
||||
VERSION 0.0.0)
|
||||
|
||||
# Checking whether host-trap PC sampling is disabled. If so, skip the tests.
|
||||
rocprofiler_sdk_pc_sampling_disabled(IS_PC_SAMPLING_DISABLED)
|
||||
|
||||
find_package(rocprofiler-sdk REQUIRED)
|
||||
|
||||
rocprofiler_configure_pytest_files(CONFIG pytest.ini COPY validate.py conftest.py
|
||||
@@ -37,7 +40,9 @@ set_tests_properties(
|
||||
FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}"
|
||||
SKIP_REGULAR_EXPRESSION
|
||||
"PC sampling unavailable")
|
||||
"PC sampling unavailable"
|
||||
DISABLED
|
||||
"${IS_PC_SAMPLING_DISABLED}")
|
||||
|
||||
add_test(
|
||||
NAME rocprofv3-test-pc-sampling-host-trap-exec-mask-manipulation-input-json-execute
|
||||
@@ -58,7 +63,9 @@ set_tests_properties(
|
||||
FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}"
|
||||
SKIP_REGULAR_EXPRESSION
|
||||
"PC sampling unavailable")
|
||||
"PC sampling unavailable"
|
||||
DISABLED
|
||||
"${IS_PC_SAMPLING_DISABLED}")
|
||||
|
||||
add_test(
|
||||
NAME rocprofv3-test-pc-sampling-host-trap-exec-mask-manipulation-input-yaml-execute
|
||||
@@ -79,7 +86,9 @@ set_tests_properties(
|
||||
FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}"
|
||||
SKIP_REGULAR_EXPRESSION
|
||||
"PC sampling unavailable")
|
||||
"PC sampling unavailable"
|
||||
DISABLED
|
||||
"${IS_PC_SAMPLING_DISABLED}")
|
||||
|
||||
# ========================= Validation tests
|
||||
|
||||
@@ -104,7 +113,9 @@ set_tests_properties(
|
||||
FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}"
|
||||
SKIP_REGULAR_EXPRESSION
|
||||
"PC sampling unavailable")
|
||||
"PC sampling unavailable"
|
||||
DISABLED
|
||||
"${IS_PC_SAMPLING_DISABLED}")
|
||||
|
||||
add_test(
|
||||
NAME rocprofv3-test-pc-sampling-host-trap-exec-mask-manipulation-input-json-validate
|
||||
@@ -127,7 +138,9 @@ set_tests_properties(
|
||||
FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}"
|
||||
SKIP_REGULAR_EXPRESSION
|
||||
"PC sampling unavailable")
|
||||
"PC sampling unavailable"
|
||||
DISABLED
|
||||
"${IS_PC_SAMPLING_DISABLED}")
|
||||
|
||||
add_test(
|
||||
NAME rocprofv3-test-pc-sampling-host-trap-exec-mask-manipulation-input-yaml-validate
|
||||
@@ -150,4 +163,6 @@ set_tests_properties(
|
||||
FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}"
|
||||
SKIP_REGULAR_EXPRESSION
|
||||
"PC sampling unavailable")
|
||||
"PC sampling unavailable"
|
||||
DISABLED
|
||||
"${IS_PC_SAMPLING_DISABLED}")
|
||||
|
||||
+21
-6
@@ -10,6 +10,9 @@ project(
|
||||
|
||||
find_package(rocprofiler-sdk REQUIRED)
|
||||
|
||||
# Check if PC sampling is disabled and whether we should skip the tests.
|
||||
rocprofiler_sdk_pc_sampling_disabled(IS_PC_SAMPLING_DISABLED)
|
||||
|
||||
rocprofiler_configure_pytest_files(CONFIG pytest.ini COPY validate.py conftest.py
|
||||
input.json input.yml)
|
||||
|
||||
@@ -43,7 +46,9 @@ set_tests_properties(
|
||||
FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}"
|
||||
SKIP_REGULAR_EXPRESSION
|
||||
"PC sampling unavailable")
|
||||
"PC sampling unavailable"
|
||||
DISABLED
|
||||
"${IS_PC_SAMPLING_DISABLED}")
|
||||
|
||||
add_test(
|
||||
NAME rocprofv3-test-pc-sampling-host-trap-transpose-multiple-agents-input-json-execute
|
||||
@@ -64,7 +69,9 @@ set_tests_properties(
|
||||
FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}"
|
||||
SKIP_REGULAR_EXPRESSION
|
||||
"PC sampling unavailable")
|
||||
"PC sampling unavailable"
|
||||
DISABLED
|
||||
"${IS_PC_SAMPLING_DISABLED}")
|
||||
|
||||
add_test(
|
||||
NAME rocprofv3-test-pc-sampling-host-trap-transpose-multiple-agents-input-yaml-execute
|
||||
@@ -85,7 +92,9 @@ set_tests_properties(
|
||||
FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}"
|
||||
SKIP_REGULAR_EXPRESSION
|
||||
"PC sampling unavailable")
|
||||
"PC sampling unavailable"
|
||||
DISABLED
|
||||
"${IS_PC_SAMPLING_DISABLED}")
|
||||
|
||||
# ========================= Validation tests
|
||||
|
||||
@@ -112,7 +121,9 @@ set_tests_properties(
|
||||
FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}"
|
||||
SKIP_REGULAR_EXPRESSION
|
||||
"PC sampling unavailable")
|
||||
"PC sampling unavailable"
|
||||
DISABLED
|
||||
"${IS_PC_SAMPLING_DISABLED}")
|
||||
|
||||
add_test(
|
||||
NAME rocprofv3-test-pc-sampling-host-trap-transpose-multiple-agents-input-json-validate
|
||||
@@ -137,7 +148,9 @@ set_tests_properties(
|
||||
FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}"
|
||||
SKIP_REGULAR_EXPRESSION
|
||||
"PC sampling unavailable")
|
||||
"PC sampling unavailable"
|
||||
DISABLED
|
||||
"${IS_PC_SAMPLING_DISABLED}")
|
||||
|
||||
add_test(
|
||||
NAME rocprofv3-test-pc-sampling-host-trap-transpose-multiple-agents-input-yaml-validate
|
||||
@@ -162,4 +175,6 @@ set_tests_properties(
|
||||
FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}"
|
||||
SKIP_REGULAR_EXPRESSION
|
||||
"PC sampling unavailable")
|
||||
"PC sampling unavailable"
|
||||
DISABLED
|
||||
"${IS_PC_SAMPLING_DISABLED}")
|
||||
|
||||
+21
-6
@@ -32,6 +32,9 @@ project(
|
||||
|
||||
find_package(rocprofiler-sdk REQUIRED)
|
||||
|
||||
# Checking whether stochastic PC sampling is disabled. If so, skip the tests.
|
||||
rocprofiler_sdk_pc_sampling_stochastic_disabled(IS_PC_SAMPLING_STOCHASTIC_DISABLED)
|
||||
|
||||
rocprofiler_configure_pytest_files(CONFIG pytest.ini COPY validate.py conftest.py
|
||||
input.json input.yml)
|
||||
|
||||
@@ -59,7 +62,9 @@ set_tests_properties(
|
||||
FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}"
|
||||
SKIP_REGULAR_EXPRESSION
|
||||
"PC sampling unavailable")
|
||||
"PC sampling unavailable"
|
||||
DISABLED
|
||||
"${IS_PC_SAMPLING_STOCHASTIC_DISABLED}")
|
||||
|
||||
add_test(
|
||||
NAME rocprofv3-test-pc-sampling-stochastic-exec-mask-manipulation-input-json-execute
|
||||
@@ -80,7 +85,9 @@ set_tests_properties(
|
||||
FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}"
|
||||
SKIP_REGULAR_EXPRESSION
|
||||
"PC sampling unavailable")
|
||||
"PC sampling unavailable"
|
||||
DISABLED
|
||||
"${IS_PC_SAMPLING_STOCHASTIC_DISABLED}")
|
||||
|
||||
add_test(
|
||||
NAME rocprofv3-test-pc-sampling-stochastic-exec-mask-manipulation-input-yaml-execute
|
||||
@@ -101,7 +108,9 @@ set_tests_properties(
|
||||
FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}"
|
||||
SKIP_REGULAR_EXPRESSION
|
||||
"PC sampling unavailable")
|
||||
"PC sampling unavailable"
|
||||
DISABLED
|
||||
"${IS_PC_SAMPLING_STOCHASTIC_DISABLED}")
|
||||
|
||||
# ========================= Validation tests
|
||||
|
||||
@@ -126,7 +135,9 @@ set_tests_properties(
|
||||
FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}"
|
||||
SKIP_REGULAR_EXPRESSION
|
||||
"PC sampling unavailable")
|
||||
"PC sampling unavailable"
|
||||
DISABLED
|
||||
"${IS_PC_SAMPLING_STOCHASTIC_DISABLED}")
|
||||
|
||||
add_test(
|
||||
NAME rocprofv3-test-pc-sampling-stochastic-exec-mask-manipulation-input-json-validate
|
||||
@@ -149,7 +160,9 @@ set_tests_properties(
|
||||
FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}"
|
||||
SKIP_REGULAR_EXPRESSION
|
||||
"PC sampling unavailable")
|
||||
"PC sampling unavailable"
|
||||
DISABLED
|
||||
"${IS_PC_SAMPLING_STOCHASTIC_DISABLED}")
|
||||
|
||||
add_test(
|
||||
NAME rocprofv3-test-pc-sampling-stochastic-exec-mask-manipulation-input-yaml-validate
|
||||
@@ -172,4 +185,6 @@ set_tests_properties(
|
||||
FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}"
|
||||
SKIP_REGULAR_EXPRESSION
|
||||
"PC sampling unavailable")
|
||||
"PC sampling unavailable"
|
||||
DISABLED
|
||||
"${IS_PC_SAMPLING_STOCHASTIC_DISABLED}")
|
||||
|
||||
+21
-6
@@ -32,6 +32,9 @@ project(
|
||||
|
||||
find_package(rocprofiler-sdk REQUIRED)
|
||||
|
||||
# Checking whether stochastic PC sampling is disabled. If so, skip the tests.
|
||||
rocprofiler_sdk_pc_sampling_stochastic_disabled(IS_PC_SAMPLING_STOCHASTIC_DISABLED)
|
||||
|
||||
rocprofiler_configure_pytest_files(CONFIG pytest.ini COPY validate.py conftest.py
|
||||
input.json input.yml)
|
||||
|
||||
@@ -65,7 +68,9 @@ set_tests_properties(
|
||||
FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}"
|
||||
SKIP_REGULAR_EXPRESSION
|
||||
"PC sampling unavailable")
|
||||
"PC sampling unavailable"
|
||||
DISABLED
|
||||
"${IS_PC_SAMPLING_STOCHASTIC_DISABLED}")
|
||||
|
||||
add_test(
|
||||
NAME rocprofv3-test-pc-sampling-stochastic-transpose-multiple-agents-input-json-execute
|
||||
@@ -86,7 +91,9 @@ set_tests_properties(
|
||||
FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}"
|
||||
SKIP_REGULAR_EXPRESSION
|
||||
"PC sampling unavailable")
|
||||
"PC sampling unavailable"
|
||||
DISABLED
|
||||
"${IS_PC_SAMPLING_STOCHASTIC_DISABLED}")
|
||||
|
||||
add_test(
|
||||
NAME rocprofv3-test-pc-sampling-stochastic-transpose-multiple-agents-input-yaml-execute
|
||||
@@ -107,7 +114,9 @@ set_tests_properties(
|
||||
FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}"
|
||||
SKIP_REGULAR_EXPRESSION
|
||||
"PC sampling unavailable")
|
||||
"PC sampling unavailable"
|
||||
DISABLED
|
||||
"${IS_PC_SAMPLING_STOCHASTIC_DISABLED}")
|
||||
|
||||
# ========================= Validation tests
|
||||
|
||||
@@ -136,7 +145,9 @@ set_tests_properties(
|
||||
FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}"
|
||||
SKIP_REGULAR_EXPRESSION
|
||||
"PC sampling unavailable")
|
||||
"PC sampling unavailable"
|
||||
DISABLED
|
||||
"${IS_PC_SAMPLING_STOCHASTIC_DISABLED}")
|
||||
|
||||
add_test(
|
||||
NAME rocprofv3-test-pc-sampling-stochastic-transpose-multiple-agents-input-json-validate
|
||||
@@ -163,7 +174,9 @@ set_tests_properties(
|
||||
FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}"
|
||||
SKIP_REGULAR_EXPRESSION
|
||||
"PC sampling unavailable")
|
||||
"PC sampling unavailable"
|
||||
DISABLED
|
||||
"${IS_PC_SAMPLING_STOCHASTIC_DISABLED}")
|
||||
|
||||
add_test(
|
||||
NAME rocprofv3-test-pc-sampling-stochastic-transpose-multiple-agents-input-yaml-validate
|
||||
@@ -190,4 +203,6 @@ set_tests_properties(
|
||||
FAIL_REGULAR_EXPRESSION
|
||||
"${ROCPROFILER_DEFAULT_FAIL_REGEX}"
|
||||
SKIP_REGULAR_EXPRESSION
|
||||
"PC sampling unavailable")
|
||||
"PC sampling unavailable"
|
||||
DISABLED
|
||||
"${IS_PC_SAMPLING_STOCHASTIC_DISABLED}")
|
||||
|
||||
Ссылка в новой задаче
Block a user