Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .github/workflows/continuous_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
11 changes: 10 additions & 1 deletion samples/pc_sampling/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 $<TARGET_FILE:pc-sampling>)
Expand All @@ -67,4 +76,4 @@ set_tests_properties(
SKIP_REGULAR_EXPRESSION
"PC sampling unavailable"
DISABLED
"${IS_PC_SAMPLING_DISABLED}")
"${IS_DISABLED}")
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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

Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -177,4 +186,4 @@ set_tests_properties(
SKIP_REGULAR_EXPRESSION
"${ROCPROFV3_TESTS_PC_SAMPLING_SKIP_REGEX}"
DISABLED
"${IS_PC_SAMPLING_DISABLED}")
"${IS_DISABLED}")
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -205,4 +214,4 @@ set_tests_properties(
SKIP_REGULAR_EXPRESSION
"${ROCPROFV3_TESTS_PC_SAMPLING_SKIP_REGEX}"
DISABLED
"${IS_PC_SAMPLING_STOCHASTIC_DISABLED}")
"${IS_DISABLED}")