JPEG Activity tracing in Perfetto (#108)

- Add JPEG activity track in perfetto trace
- Add JPEG decode tests to the examples
- Change existing videodecode test to include JPEG testing
- Rename videodecode test file to decode to include jpeg tests too
- Fix a bug in the test which checks for total activity of 0
- Disable rocDecode and rocJPEG samples from the github image files
This commit is contained in:
Sajina PK
2025-02-21 10:25:01 -05:00
zatwierdzone przez GitHub
rodzic c1d8799f92
commit 59d3399901
21 zmienionych plików z 1637 dodań i 72 usunięć
+1 -1
Wyświetl plik
@@ -23,6 +23,6 @@ include(${CMAKE_CURRENT_LIST_DIR}/rocprof-sys-overflow-tests.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/rocprof-sys-annotate-tests.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/rocprof-sys-causal-tests.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/rocprof-sys-python-tests.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/rocprof-sys-videodecode-tests.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/rocprof-sys-decode-tests.cmake)
add_subdirectory(source)
+49
Wyświetl plik
@@ -0,0 +1,49 @@
# -------------------------------------------------------------------------------------- #
#
# video decode tests
#
# -------------------------------------------------------------------------------------- #
set(_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,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 "${_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")
# -------------------------------------------------------------------------------------- #
#
# image decode tests
#
# -------------------------------------------------------------------------------------- #
rocprofiler_systems_add_test(
SKIP_BASELINE SKIP_RUNTIME SKIP_REWRITE
NAME image-decode
TARGET jpegdecode
GPU ON
ENVIRONMENT "${_decode_environment}"
RUN_ARGS -i ${PROJECT_BINARY_DIR}/images -b 32
LABELS "decode")
rocprofiler_systems_add_validation_test(
NAME image-decode-sampling
PERFETTO_METRIC "host"
PERFETTO_FILE "perfetto-trace.proto"
LABELS "decode"
ARGS -l jpegdecode -c 1 -d 0 --counter-names "JPEG Activity")
@@ -1,22 +0,0 @@
# -------------------------------------------------------------------------------------- #
#
# video decode tests
#
# -------------------------------------------------------------------------------------- #
rocprofiler_systems_add_test(
SKIP_BASELINE SKIP_RUNTIME SKIP_REWRITE
NAME videodecode
TARGET videodecode
GPU ON
ENVIRONMENT
"${_base_environment};ROCPROFSYS_ROCM_DOMAINS=hip_runtime_api,kernel_dispatch,memory_copy,rocdecode_api"
RUN_ARGS -i ${PROJECT_BINARY_DIR}/videos -t 1
LABELS "videodecode")
rocprofiler_systems_add_validation_test(
NAME videodecode-sampling
PERFETTO_METRIC "rocm_rocdecode_api"
PERFETTO_FILE "perfetto-trace.proto"
LABELS "videodecode"
ARGS -l rocDecCreateVideoParser -c 2 -d 1 --counter-names "GPU VCN Activity")
+1 -1
Wyświetl plik
@@ -186,7 +186,7 @@ if __name__ == "__main__":
sum_counter_values = tp.query(
f"""SELECT SUM(counter.value) AS total_value FROM counter_track JOIN counter ON
counter.track_id = counter_track.id WHERE counter_track.name LIKE
'{counter_name}%'"""
'%{counter_name}%'"""
)
total_value = 0
for row in sum_counter_values: