Skip to content

Commit

Permalink
re-enable updated analyze_commands tests - now configured to run in p…
Browse files Browse the repository at this point in the history
…arallel for

extra fun

Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
  • Loading branch information
koomie committed Feb 27, 2024
1 parent 9b63bba commit 9aee84c
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 83 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/mi100.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
mkdir build
cd build
ml cmake
cmake -DENABLE_COVERAGE=ON -DPYTEST_NUMPROCS=24 ..
cmake -DENABLE_COVERAGE=ON -DPYTEST_NUMPROCS=16 ..
- name: Create HIP binary (vcopy)
run: hipcc -o tests/vcopy ./sample/vcopy.cpp
- name: Run [profile] mode
Expand All @@ -63,18 +63,17 @@ jobs:
run: |
cd build
srun -N 1 -J omniperf -p ci -t 00:10:00 ctest --verbose -R test_analyze_workloads
- name: Run [analyze commands] mode
if: '!cancelled()'
run: |
cd build
srun -N 1 -J omniperf -p ci -t 00:10:00 ctest --verbose -R test_analyze_commands
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action/linux@v2
if: always()
with:
files: |
tests/**/test_*.xml
## - name: Run [analyze workloads] mode
## run: |
## cd build
## srun -N 1 -J omniperf -p ci -t 00:20:00 ctest -j 4 --resource-spec-file ../tests/4gpus.json --verbose -L profile
# srun -N 1 -J omniperf -p ci -t 00:20:00 ctest --verbose -R test_profile_kernel_execution

## ## - name: Pytest coverage comment
## ## if: '!cancelled()'
## ## uses: MishaKav/pytest-coverage-comment@v1.1.48
Expand Down
129 changes: 53 additions & 76 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -260,84 +260,61 @@ set_tests_properties(
# ---------------------------

add_test(
NAME test_analyze_commands_misc
COMMAND pytest -m misc ${COV_OPTION}
${PROJECT_SOURCE_DIR}/tests/test_analyze_commands.py
NAME test_analyze_commands
COMMAND pytest -n ${PYTEST_NUMPROCS} --junitxml=tests/test_analyze_commands.xml
${COV_OPTION} ${PROJECT_SOURCE_DIR}/tests/test_analyze_commands.py
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR})

add_test(
NAME test_analyze_commands_list_metrics
COMMAND pytest -m list_metrics ${COV_OPTION}
${PROJECT_SOURCE_DIR}/tests/test_analyze_commands.py
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR})

add_test(
NAME test_analyze_commands_filter_metrics
COMMAND pytest -m filter_metrics ${COV_OPTION}
${PROJECT_SOURCE_DIR}/tests/test_analyze_commands.py
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR})

add_test(
NAME test_analyze_commands_filter_kernel
COMMAND pytest -m filter_kernel ${COV_OPTION}
${PROJECT_SOURCE_DIR}/tests/test_analyze_commands.py
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR})

add_test(
NAME test_analyze_commands_dispatch
COMMAND pytest -m dispatch ${COV_OPTION}
${PROJECT_SOURCE_DIR}/tests/test_analyze_commands.py
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR})

add_test(
NAME test_analyze_commands_normal_unit
COMMAND pytest -m normal_unit ${COV_OPTION}
${PROJECT_SOURCE_DIR}/tests/test_analyze_commands.py
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR})

add_test(
NAME test_analyze_commands_max_kernel
COMMAND pytest -m max_kernel ${COV_OPTION}
${PROJECT_SOURCE_DIR}/tests/test_analyze_commands.py
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR})

add_test(
NAME test_analyze_commands_time_unit
COMMAND pytest -m time_unit ${COV_OPTION}
${PROJECT_SOURCE_DIR}/tests/test_analyze_commands.py
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR})

add_test(
NAME test_analyze_commands_decimal
COMMAND pytest -m decimal ${COV_OPTION}
${PROJECT_SOURCE_DIR}/tests/test_analyze_commands.py
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR})

add_test(
NAME test_analyze_commands_col
COMMAND pytest -m col ${COV_OPTION}
${PROJECT_SOURCE_DIR}/tests/test_analyze_commands.py
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR})

add_test(
NAME test_analyze_commands_kernel_verbose
COMMAND pytest -m kernel_verbose ${COV_OPTION}
${PROJECT_SOURCE_DIR}/tests/test_analyze_commands.py
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR})

set_tests_properties(
test_analyze_commands_misc
test_analyze_commands_list_metrics
test_analyze_commands_filter_metrics
test_analyze_commands_filter_kernel
test_analyze_commands_dispatch
test_analyze_commands_normal_unit
test_analyze_commands_max_kernel
test_analyze_commands_time_unit
test_analyze_commands_decimal
test_analyze_commands_col
test_analyze_commands_kernel_verbose
PROPERTIES LABELS "analyze_commands")
# add_test( NAME test_analyze_commands_misc COMMAND pytest -m misc ${COV_OPTION}
# ${PROJECT_SOURCE_DIR}/tests/test_analyze_commands.py WORKING_DIRECTORY
# ${PROJECT_SOURCE_DIR})
#
# add_test( NAME test_analyze_commands_list_metrics COMMAND pytest -m list_metrics
# ${COV_OPTION} ${PROJECT_SOURCE_DIR}/tests/test_analyze_commands.py WORKING_DIRECTORY
# ${PROJECT_SOURCE_DIR})
#
# add_test( NAME test_analyze_commands_filter_metrics COMMAND pytest -m filter_metrics
# ${COV_OPTION} ${PROJECT_SOURCE_DIR}/tests/test_analyze_commands.py WORKING_DIRECTORY
# ${PROJECT_SOURCE_DIR})
#
# add_test( NAME test_analyze_commands_filter_kernel COMMAND pytest -m filter_kernel
# ${COV_OPTION} ${PROJECT_SOURCE_DIR}/tests/test_analyze_commands.py WORKING_DIRECTORY
# ${PROJECT_SOURCE_DIR})
#
# add_test( NAME test_analyze_commands_dispatch COMMAND pytest -m dispatch ${COV_OPTION}
# ${PROJECT_SOURCE_DIR}/tests/test_analyze_commands.py WORKING_DIRECTORY
# ${PROJECT_SOURCE_DIR})
#
# add_test( NAME test_analyze_commands_normal_unit COMMAND pytest -m normal_unit
# ${COV_OPTION} ${PROJECT_SOURCE_DIR}/tests/test_analyze_commands.py WORKING_DIRECTORY
# ${PROJECT_SOURCE_DIR})
#
# add_test( NAME test_analyze_commands_max_kernel COMMAND pytest -m max_kernel
# ${COV_OPTION} ${PROJECT_SOURCE_DIR}/tests/test_analyze_commands.py WORKING_DIRECTORY
# ${PROJECT_SOURCE_DIR})
#
# add_test( NAME test_analyze_commands_time_unit COMMAND pytest -m time_unit ${COV_OPTION}
# ${PROJECT_SOURCE_DIR}/tests/test_analyze_commands.py WORKING_DIRECTORY
# ${PROJECT_SOURCE_DIR})
#
# add_test( NAME test_analyze_commands_decimal COMMAND pytest -m decimal ${COV_OPTION}
# ${PROJECT_SOURCE_DIR}/tests/test_analyze_commands.py WORKING_DIRECTORY
# ${PROJECT_SOURCE_DIR})
#
# add_test( NAME test_analyze_commands_col COMMAND pytest -m col ${COV_OPTION}
# ${PROJECT_SOURCE_DIR}/tests/test_analyze_commands.py WORKING_DIRECTORY
# ${PROJECT_SOURCE_DIR})
#
# add_test( NAME test_analyze_commands_kernel_verbose COMMAND pytest -m kernel_verbose
# ${COV_OPTION} ${PROJECT_SOURCE_DIR}/tests/test_analyze_commands.py WORKING_DIRECTORY
# ${PROJECT_SOURCE_DIR})
#
# set_tests_properties( test_analyze_commands_misc test_analyze_commands_list_metrics
# test_analyze_commands_filter_metrics test_analyze_commands_filter_kernel
# test_analyze_commands_dispatch test_analyze_commands_normal_unit
# test_analyze_commands_max_kernel test_analyze_commands_time_unit
# test_analyze_commands_decimal test_analyze_commands_col
# test_analyze_commands_kernel_verbose PROPERTIES LABELS "analyze_commands")

# ---------------------------
# analyze workloads tests
Expand Down

0 comments on commit 9aee84c

Please sign in to comment.