diff --git a/.github/workflows/continuous_integration.yml b/.github/workflows/continuous_integration.yml index d568c0557..7a7e36273 100644 --- a/.github/workflows/continuous_integration.yml +++ b/.github/workflows/continuous_integration.yml @@ -90,7 +90,6 @@ jobs: ls -la - name: Enable PC Sampling - if: ${{ contains(matrix.runner, 'mi200') || contains(matrix.runner, 'mi300a') }} shell: bash run: | echo 'ROCPROFILER_PC_SAMPLING_BETA_ENABLED=1' >> $GITHUB_ENV @@ -224,7 +223,6 @@ jobs: ls -la - name: Enable PC Sampling - if: ${{ contains(matrix.runner, 'mi200') || contains(matrix.runner, 'mi300a') }} shell: bash run: | echo 'ROCPROFILER_PC_SAMPLING_BETA_ENABLED=1' >> $GITHUB_ENV @@ -295,7 +293,6 @@ jobs: ls -la - name: Enable PC Sampling - if: ${{ contains(matrix.runner, 'mi200') || contains(matrix.runner, 'mi300a') }} shell: bash run: | echo 'ROCPROFILER_PC_SAMPLING_BETA_ENABLED=1' >> $GITHUB_ENV diff --git a/samples/pc_sampling/CMakeLists.txt b/samples/pc_sampling/CMakeLists.txt index c3fbf54f7..f54548002 100644 --- a/samples/pc_sampling/CMakeLists.txt +++ b/samples/pc_sampling/CMakeLists.txt @@ -50,6 +50,15 @@ 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) +# For some reason, ThreadSanitizer reports a lock-order-invervsion error when running the +# transpose application standalone. Thus, we disable ThreadSanitizer on PC sampling tests +# that are using transpose application. +if(IS_PC_SAMPLING_DISABLED OR ROCPROFILER_MEMCHECK STREQUAL "ThreadSanitizer") + set(IS_DISABLED ON) +else() + set(IS_DISABLED OFF) +endif() + set(pc-sampling-env ${PRELOAD_ENV} ${LIBRARY_PATH_ENV}) add_test(NAME pc-sampling COMMAND $) @@ -67,4 +76,4 @@ set_tests_properties( SKIP_REGULAR_EXPRESSION "PC sampling unavailable" DISABLED - "${IS_PC_SAMPLING_DISABLED}") + "${IS_DISABLED}") diff --git a/tests/rocprofv3/pc-sampling/host-trap/transpose-multiple-agents/CMakeLists.txt b/tests/rocprofv3/pc-sampling/host-trap/transpose-multiple-agents/CMakeLists.txt index 6851871ca..086e9e4e6 100644 --- a/tests/rocprofv3/pc-sampling/host-trap/transpose-multiple-agents/CMakeLists.txt +++ b/tests/rocprofv3/pc-sampling/host-trap/transpose-multiple-agents/CMakeLists.txt @@ -13,6 +13,15 @@ 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) +# For some reason, ThreadSanitizer reports a lock-order-invervsion error when running the +# transpose application standalone. Thus, we disable ThreadSanitizer on PC sampling tests +# that are using transpose application. +if(IS_PC_SAMPLING_DISABLED OR ROCPROFILER_MEMCHECK STREQUAL "ThreadSanitizer") + set(IS_DISABLED ON) +else() + set(IS_DISABLED OFF) +endif() + rocprofiler_configure_pytest_files(CONFIG pytest.ini COPY validate.py conftest.py input.json input.yml) @@ -48,7 +57,7 @@ set_tests_properties( SKIP_REGULAR_EXPRESSION "${ROCPROFV3_TESTS_PC_SAMPLING_SKIP_REGEX}" DISABLED - "${IS_PC_SAMPLING_DISABLED}") + "${IS_DISABLED}") add_test( NAME rocprofv3-test-pc-sampling-host-trap-transpose-multiple-agents-input-json-execute @@ -71,7 +80,7 @@ set_tests_properties( SKIP_REGULAR_EXPRESSION "${ROCPROFV3_TESTS_PC_SAMPLING_SKIP_REGEX}" DISABLED - "${IS_PC_SAMPLING_DISABLED}") + "${IS_DISABLED}") add_test( NAME rocprofv3-test-pc-sampling-host-trap-transpose-multiple-agents-input-yaml-execute @@ -94,7 +103,7 @@ set_tests_properties( SKIP_REGULAR_EXPRESSION "${ROCPROFV3_TESTS_PC_SAMPLING_SKIP_REGEX}" DISABLED - "${IS_PC_SAMPLING_DISABLED}") + "${IS_DISABLED}") # ========================= Validation tests @@ -123,7 +132,7 @@ set_tests_properties( SKIP_REGULAR_EXPRESSION "${ROCPROFV3_TESTS_PC_SAMPLING_SKIP_REGEX}" DISABLED - "${IS_PC_SAMPLING_DISABLED}") + "${IS_DISABLED}") add_test( NAME rocprofv3-test-pc-sampling-host-trap-transpose-multiple-agents-input-json-validate @@ -150,7 +159,7 @@ set_tests_properties( SKIP_REGULAR_EXPRESSION "${ROCPROFV3_TESTS_PC_SAMPLING_SKIP_REGEX}" DISABLED - "${IS_PC_SAMPLING_DISABLED}") + "${IS_DISABLED}") add_test( NAME rocprofv3-test-pc-sampling-host-trap-transpose-multiple-agents-input-yaml-validate @@ -177,4 +186,4 @@ set_tests_properties( SKIP_REGULAR_EXPRESSION "${ROCPROFV3_TESTS_PC_SAMPLING_SKIP_REGEX}" DISABLED - "${IS_PC_SAMPLING_DISABLED}") + "${IS_DISABLED}") diff --git a/tests/rocprofv3/pc-sampling/stochastic/transpose-multiple-agents/CMakeLists.txt b/tests/rocprofv3/pc-sampling/stochastic/transpose-multiple-agents/CMakeLists.txt index ca88e6567..b2d349ea9 100644 --- a/tests/rocprofv3/pc-sampling/stochastic/transpose-multiple-agents/CMakeLists.txt +++ b/tests/rocprofv3/pc-sampling/stochastic/transpose-multiple-agents/CMakeLists.txt @@ -35,6 +35,15 @@ 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) +# For some reason, ThreadSanitizer reports a lock-order-invervsion error when running the +# transpose application standalone. Thus, we disable ThreadSanitizer on PC sampling tests +# that are using transpose application. +if(IS_PC_SAMPLING_DISABLED OR ROCPROFILER_MEMCHECK STREQUAL "ThreadSanitizer") + set(IS_DISABLED ON) +else() + set(IS_DISABLED OFF) +endif() + rocprofiler_configure_pytest_files(CONFIG pytest.ini COPY validate.py conftest.py input.json input.yml) @@ -70,7 +79,7 @@ set_tests_properties( SKIP_REGULAR_EXPRESSION "${ROCPROFV3_TESTS_PC_SAMPLING_SKIP_REGEX}" DISABLED - "${IS_PC_SAMPLING_STOCHASTIC_DISABLED}") + "${IS_DISABLED}") add_test( NAME rocprofv3-test-pc-sampling-stochastic-transpose-multiple-agents-input-json-execute @@ -93,7 +102,7 @@ set_tests_properties( SKIP_REGULAR_EXPRESSION "${ROCPROFV3_TESTS_PC_SAMPLING_SKIP_REGEX}" DISABLED - "${IS_PC_SAMPLING_STOCHASTIC_DISABLED}") + "${IS_DISABLED}") add_test( NAME rocprofv3-test-pc-sampling-stochastic-transpose-multiple-agents-input-yaml-execute @@ -116,7 +125,7 @@ set_tests_properties( SKIP_REGULAR_EXPRESSION "${ROCPROFV3_TESTS_PC_SAMPLING_SKIP_REGEX}" DISABLED - "${IS_PC_SAMPLING_STOCHASTIC_DISABLED}") + "${IS_DISABLED}") # ========================= Validation tests @@ -147,7 +156,7 @@ set_tests_properties( SKIP_REGULAR_EXPRESSION "${ROCPROFV3_TESTS_PC_SAMPLING_SKIP_REGEX}" DISABLED - "${IS_PC_SAMPLING_STOCHASTIC_DISABLED}") + "${IS_DISABLED}") add_test( NAME rocprofv3-test-pc-sampling-stochastic-transpose-multiple-agents-input-json-validate @@ -176,7 +185,7 @@ set_tests_properties( SKIP_REGULAR_EXPRESSION "${ROCPROFV3_TESTS_PC_SAMPLING_SKIP_REGEX}" DISABLED - "${IS_PC_SAMPLING_STOCHASTIC_DISABLED}") + "${IS_DISABLED}") add_test( NAME rocprofv3-test-pc-sampling-stochastic-transpose-multiple-agents-input-yaml-validate @@ -205,4 +214,4 @@ set_tests_properties( SKIP_REGULAR_EXPRESSION "${ROCPROFV3_TESTS_PC_SAMPLING_SKIP_REGEX}" DISABLED - "${IS_PC_SAMPLING_STOCHASTIC_DISABLED}") + "${IS_DISABLED}")