Files
rocm-systems/tests/rocprofv3/hsa-queue-dependency/CMakeLists.txt
T
Gopesh Bhardwaj dc054eea76 Adding python script for rocprofv3 (#849)
* Adding python script for rocprofv3

* script update

* updating script

* Fixing script for counter collection tests

* Fixing Sanitizer issues

* Adding YAML input file support

* Fixing counter validation tests

* script modifications

* Adding missing LD_PRELOAD

* doc updates

* Adding test for yaml input

* updated yaml extension support in doc

* backward compatibility

* updating scripts

* Fixing git history rocprofv3- part1

* Fixing git history rocprofv3- part2

* Fixing rocprofv3 history final

* Rebasing PR 860 for json support

* Review comments: Parser updates

* Removed color encoding and rebasing again

* Addressing review comments

* removing globals

* Update rocprofv3.py

- update tests to conform to new argparse requirements
- added support for JSON

* Slight tweak to update_env for ROCP_OUTPUT_FORMAT

* Update rocprofv3.py

- Handle ROCPROF_PRELOAD
- Add --preload option
- Add --kernel-names option

* Update rocprofv3.py

- Fix update_env handling of prepend/append
- Tweak --preload argument

---------

Co-authored-by: Jonathan R. Madsen <jonathanrmadsen@gmail.com>
2024-05-29 05:05:10 -05:00

62 lines
2.1 KiB
CMake

#
# rocprofv3 tool test
#
cmake_minimum_required(VERSION 3.21.0 FATAL_ERROR)
project(
rocprofiler-tests-rocprofv3-hsa-queue-tracing
LANGUAGES CXX
VERSION 0.0.0)
string(REPLACE "LD_PRELOAD=" "--preload;" PRELOAD_ARGS
"${ROCPROFILER_MEMCHECK_PRELOAD_ENV}")
set(tracing-env "")
rocprofiler_configure_pytest_files(CONFIG pytest.ini COPY validate.py conftest.py)
find_package(rocprofiler-sdk REQUIRED)
# hsa multiqueue dependency test
add_test(
NAME rocprofv3-test-hsa-multiqueue-execute
COMMAND
$<TARGET_FILE:rocprofiler-sdk::rocprofv3> --hsa-trace --kernel-trace -d
${CMAKE_CURRENT_BINARY_DIR}/%argt%-trace -o out --output-format json csv pftrace
${PRELOAD_ARGS} -- $<TARGET_FILE:multiqueue_testapp>)
set_tests_properties(
rocprofv3-test-hsa-multiqueue-execute
PROPERTIES LABELS "integration-tests" ENVIRONMENT "${tracing-env}"
FAIL_REGULAR_EXPRESSION "HSA_API|HIP_API")
add_test(
NAME rocprofv3-test-hsa-multiqueue-validate
COMMAND
${Python3_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/validate.py --hsa-trace-input
${CMAKE_CURRENT_BINARY_DIR}/multiqueue_testapp-trace/out_hsa_api_trace.csv
--kernel-trace-input
${CMAKE_CURRENT_BINARY_DIR}/multiqueue_testapp-trace/out_kernel_trace.csv
--json-input
${CMAKE_CURRENT_BINARY_DIR}/multiqueue_testapp-trace/out_results.json
--pftrace-input
${CMAKE_CURRENT_BINARY_DIR}/multiqueue_testapp-trace/out_results.pftrace)
set(MULTIQUEUE_VALIDATION_FILES
${CMAKE_CURRENT_BINARY_DIR}/multiqueue_testapp-trace/out_hsa_api_trace.csv
${CMAKE_CURRENT_BINARY_DIR}/multiqueue_testapp-trace/out_kernel_api_trace.csv
${CMAKE_CURRENT_BINARY_DIR}/multiqueue_testapp-trace/out_results.json)
set_tests_properties(
rocprofv3-test-hsa-multiqueue-validate
PROPERTIES TIMEOUT
45
LABELS
"integration-tests"
DEPENDS
"rocprofv3-test-hsa-multiqueue-execute"
FAIL_REGULAR_EXPRESSION
"AssertionError"
ATTACHED_FILES_ON_FAIL
"${MULTIQUEUE_VALIDATION_FILES}")