Adding test for demangling (#467)
* Adding test for demangling
* moving -M option to existing one
* minor typo in script and test correction
[ROCm/rocprofiler-sdk commit: 2b1c11a4f3]
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
ebd08ab5eb
Коммит
4bee0ece8b
@@ -26,7 +26,7 @@ usage() {
|
||||
echo -e "${GREEN}--marker-trace ${RESET} For Collecting Marker (ROCTx) Traces"
|
||||
echo -e "${GREEN}--hip-trace ${RESET} For Collecting HIP Runtime Traces"
|
||||
echo -e "${GREEN}--hip-compiler-trace ${RESET} For Collecting HIP Compiler generated code Traces"
|
||||
echo -e "${GREEN}--sys-trace ${RESET} For Collecting HIP,HSA, Memory Copy, (marker)ROCTx, Kernel dispatch and HIP compiler traces\n"
|
||||
echo -e "${GREEN}--sys-trace ${RESET} For Collecting HIP,HSA, Memory Copy, (marker)ROCTx and Kernel dispatch traces\n"
|
||||
echo -e "${GREEN}-o | --output-file ${RESET} For the output file name"
|
||||
echo -e "\t#${GREY} usage e.g:(with current dir): rocprofv3 --hsa-trace -o <file_name> <executable>"
|
||||
echo -e "\t#${GREY} usage e.g:(with custom dir): rocprofv3 --hsa-trace -d <out_dir> -o <file_name> <executable>${RESET}\n"
|
||||
|
||||
@@ -13,7 +13,7 @@ find_package(rocprofiler-sdk REQUIRED)
|
||||
add_test(
|
||||
NAME rocprofv3-test-trace-execute
|
||||
COMMAND
|
||||
$<TARGET_FILE:rocprofiler-sdk::rocprofv3> --hsa-trace --kernel-trace
|
||||
$<TARGET_FILE:rocprofiler-sdk::rocprofv3> -M --hsa-trace --kernel-trace
|
||||
--memory-copy-trace --marker-trace -d ${CMAKE_CURRENT_BINARY_DIR}/%argt%-trace -o
|
||||
out $<TARGET_FILE:simple-transpose>)
|
||||
|
||||
@@ -78,12 +78,13 @@ set_tests_properties(
|
||||
ATTACHED_FILES_ON_FAIL
|
||||
"${VALIDATION_FILES}")
|
||||
|
||||
# sys-trace test: tests --sys-trace command and validates generated files
|
||||
# sys-trace test: tests --sys-trace command with mangled kernel names and validates
|
||||
# generated files
|
||||
|
||||
add_test(
|
||||
NAME rocprofv3-test-systrace-execute
|
||||
COMMAND
|
||||
$<TARGET_FILE:rocprofiler-sdk::rocprofv3> --sys-trace -d
|
||||
$<TARGET_FILE:rocprofiler-sdk::rocprofv3> -M --sys-trace -d
|
||||
${CMAKE_CURRENT_BINARY_DIR}/%argt%-systrace -o out
|
||||
$<TARGET_FILE:simple-transpose>)
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
import sys
|
||||
import pytest
|
||||
import re
|
||||
|
||||
|
||||
def test_hsa_api_trace(hsa_input_data):
|
||||
@@ -36,12 +37,13 @@ def test_hsa_api_trace(hsa_input_data):
|
||||
|
||||
|
||||
def test_kernel_trace(kernel_input_data):
|
||||
mangled_kernel_name = "_Z15matrixTransposePfS_i.kd"
|
||||
for row in kernel_input_data:
|
||||
assert row["Kind"] == "KERNEL_DISPATCH"
|
||||
assert int(row["Agent_Id"]) > 0
|
||||
assert int(row["Queue_Id"]) > 0
|
||||
assert int(row["Kernel_Id"]) > 0
|
||||
assert row["Kernel_Name"] == "matrixTranspose(float*, float*, int)"
|
||||
assert row["Kernel_Name"] == mangled_kernel_name
|
||||
assert int(row["Correlation_Id"]) > 0
|
||||
assert int(row["Workgroup_Size_X"]) == 4
|
||||
assert int(row["Workgroup_Size_Y"]) == 4
|
||||
|
||||
Ссылка в новой задаче
Block a user