Files
rocm-systems/tests/rocprof-sys-decode-tests.cmake
T
Sajina PK 3bea1d8eac Add support for rocJPEG API tracing (#116)
- Add rocDecode API Tracing support using domain `rocjpeg_api` in ROCPROFSYS_ROCM_DOMAINS.
- Modify existing `videodecode` and `jpegdecode` ctests to verify API tracing
- Print Perfetto values for easy debugging in verbose mode
- Convert CMake error to a warning and skip building the "decode" examples if requirements are not found
2025-02-25 21:14:14 -05:00

71 rivejä
2.0 KiB
CMake

# -------------------------------------------------------------------------------------- #
#
# video decode tests
#
# -------------------------------------------------------------------------------------- #
set(_video_decode_environment
"${_base_environment}"
"ROCPROFSYS_ROCM_DOMAINS=hip_runtime_api,kernel_dispatch,memory_copy,rocdecode_api"
"ROCPROFSYS_ROCM_SMI_METRICS=busy,temp,power,vcn_activity,mem_usage"
"ROCPROFSYS_SAMPLING_CPUS=none")
set(_jpeg_decode_environment
"${_base_environment}"
"ROCPROFSYS_ROCM_DOMAINS=hip_runtime_api,kernel_dispatch,memory_copy,rocjpeg_api"
"ROCPROFSYS_ROCM_SMI_METRICS=busy,temp,power,jpeg_activity,mem_usage"
"ROCPROFSYS_SAMPLING_CPUS=none")
rocprofiler_systems_add_test(
SKIP_BASELINE SKIP_RUNTIME SKIP_REWRITE
NAME video-decode
TARGET videodecode
GPU ON
ENVIRONMENT "${_video_decode_environment}"
RUN_ARGS -i ${PROJECT_BINARY_DIR}/videos -t 1
LABELS "decode")
rocprofiler_systems_add_validation_test(
NAME video-decode-sampling
PERFETTO_METRIC "rocm_rocdecode_api"
PERFETTO_FILE "perfetto-trace.proto"
LABELS "decode"
ARGS -l
rocDecCreateVideoParser
-c
2
-d
1
--counter-names
"VCN Activity"
-p)
# -------------------------------------------------------------------------------------- #
#
# jpeg decode tests
#
# -------------------------------------------------------------------------------------- #
rocprofiler_systems_add_test(
SKIP_BASELINE SKIP_RUNTIME SKIP_REWRITE
NAME jpeg-decode
TARGET jpegdecode
GPU ON
ENVIRONMENT "${_jpeg_decode_environment}"
RUN_ARGS -i ${PROJECT_BINARY_DIR}/images -b 32
LABELS "decode")
rocprofiler_systems_add_validation_test(
NAME jpeg-decode-sampling
PERFETTO_METRIC "rocm_rocjpeg_api"
PERFETTO_FILE "perfetto-trace.proto"
LABELS "decode"
ARGS -l
rocJpegCreate
-c
1
-d
1
--counter-names
"JPEG Activity"
-p)