From e453705d9bea47f0a8b8ae9a2fe8fe868005af52 Mon Sep 17 00:00:00 2001 From: David Galiffi Date: Wed, 22 Oct 2025 12:19:38 -0400 Subject: [PATCH] Check if test exists before adding validation (#1478) * Check if test exists before adding validation * Adjust validation parameters for rocpd_string Signed-off-by: David Galiffi --------- Signed-off-by: David Galiffi --- .../jpeg-decode/sdk-metrics-rules.json | 6 +++--- .../openmp-target/sdk-metrics-rules.json | 8 ++++---- .../roctx/sdk-metrics-rules.json | 14 +++++++------- .../transpose/sdk-metrics-rules.json | 4 ++-- .../video-decode/sdk-metrics-rules.json | 6 +++--- .../tests/rocprof-sys-decode-tests.cmake | 4 ++-- .../tests/rocprof-sys-openmp-tests.cmake | 2 +- .../tests/rocprof-sys-rocm-tests.cmake | 2 +- .../tests/rocprof-sys-roctx-tests.cmake | 2 +- 9 files changed, 24 insertions(+), 24 deletions(-) diff --git a/projects/rocprofiler-systems/tests/rocpd-validation-rules/jpeg-decode/sdk-metrics-rules.json b/projects/rocprofiler-systems/tests/rocpd-validation-rules/jpeg-decode/sdk-metrics-rules.json index 7fba791fb8..78d15e0ec9 100644 --- a/projects/rocprofiler-systems/tests/rocpd-validation-rules/jpeg-decode/sdk-metrics-rules.json +++ b/projects/rocprofiler-systems/tests/rocpd-validation-rules/jpeg-decode/sdk-metrics-rules.json @@ -46,7 +46,7 @@ "comparison": "greater_than", "description": "Verify that 'rocm_rocjpeg_api' string is present in the table", "error_message": "'rocm_rocjpeg_api' string not found in the table rocpd_string", - "expected_result": 1, + "expected_result": 0, "query": "SELECT COUNT(*) FROM rocpd_string WHERE string LIKE '%rocm_rocjpeg_api%';" } ] @@ -121,10 +121,10 @@ ], "validation_queries": [ { - "comparison": "greater_than_or_equal", + "comparison": "greater_than", "description": "Verify that 'rocm_hip_api' string is present in the table", "error_message": "'rocm_hip_api' string not found in the table rocpd_string", - "expected_result": 1, + "expected_result": 0, "query": "SELECT COUNT(*) FROM rocpd_string WHERE string LIKE '%rocm_hip_api%';" } ] diff --git a/projects/rocprofiler-systems/tests/rocpd-validation-rules/openmp-target/sdk-metrics-rules.json b/projects/rocprofiler-systems/tests/rocpd-validation-rules/openmp-target/sdk-metrics-rules.json index 8f290700f7..e9d70cb553 100644 --- a/projects/rocprofiler-systems/tests/rocpd-validation-rules/openmp-target/sdk-metrics-rules.json +++ b/projects/rocprofiler-systems/tests/rocpd-validation-rules/openmp-target/sdk-metrics-rules.json @@ -36,10 +36,10 @@ ], "validation_queries": [ { - "comparison": "greater_than_or_equal", + "comparison": "greater_than", "description": "Verify that 'rocm_ompt_api' string is present in the table", "error_message": "'rocm_ompt_api' string not found in the table rocpd_string", - "expected_result": 1, + "expected_result": 0, "query": "SELECT COUNT(*) FROM rocpd_string WHERE string LIKE '%rocm_ompt_api%';" } ] @@ -87,10 +87,10 @@ ], "validation_queries": [ { - "comparison": "greater_than_or_equal", + "comparison": "greater_than", "description": "Verify that 'rocm_hsa_api' string is present in the table", "error_message": "'rocm_hsa_api' string not found in the table rocpd_string", - "expected_result": 1, + "expected_result": 0, "query": "SELECT COUNT(*) FROM rocpd_string WHERE string LIKE '%rocm_hsa_api%';" } ] diff --git a/projects/rocprofiler-systems/tests/rocpd-validation-rules/roctx/sdk-metrics-rules.json b/projects/rocprofiler-systems/tests/rocpd-validation-rules/roctx/sdk-metrics-rules.json index b0eca381d9..b61b1c9748 100644 --- a/projects/rocprofiler-systems/tests/rocpd-validation-rules/roctx/sdk-metrics-rules.json +++ b/projects/rocprofiler-systems/tests/rocpd-validation-rules/roctx/sdk-metrics-rules.json @@ -38,10 +38,10 @@ ], "validation_queries": [ { - "comparison": "equals", - "description": "Verify that 'rocm_marker_api' appears in category 11 times in 'regions' table", - "error_message": "Expected 11 'rocm_marker_api' entries in the 'regions' table", - "expected_result": 11, + "comparison": "greater_than_or_equal", + "description": "Verify that 'rocm_marker_api' appears in category 10 times in 'regions' table", + "error_message": "Less than 10 'rocm_marker_api' entries in the 'regions' table", + "expected_result": 10, "query": "SELECT COUNT(*) FROM regions WHERE category = 'rocm_marker_api';" }, { @@ -91,17 +91,17 @@ ], "validation_queries": [ { - "comparison": "greater_than_or_equal", + "comparison": "greater_than", "description": "Verify that 'rocm_marker_api' string is present in the table", "error_message": "'rocm_marker_api' string not found in the table rocpd_string", - "expected_result": 1, + "expected_result": 0, "query": "SELECT COUNT(*) FROM rocpd_string WHERE string LIKE '%rocm_marker_api%';" }, { "comparison": "greater_than", "description": "Verify that 'roctx' string is present in the table", "error_message": "'roctx' string not found in the table rocpd_string", - "expected_result": 1, + "expected_result": 0, "query": "SELECT COUNT(*) FROM rocpd_string WHERE string LIKE '%roctx%';" } ] diff --git a/projects/rocprofiler-systems/tests/rocpd-validation-rules/transpose/sdk-metrics-rules.json b/projects/rocprofiler-systems/tests/rocpd-validation-rules/transpose/sdk-metrics-rules.json index feca976bf1..7e0b34daec 100644 --- a/projects/rocprofiler-systems/tests/rocpd-validation-rules/transpose/sdk-metrics-rules.json +++ b/projects/rocprofiler-systems/tests/rocpd-validation-rules/transpose/sdk-metrics-rules.json @@ -73,7 +73,7 @@ "comparison": "greater_than", "description": "Verify that 'rocm_hip_api' string is present in the table", "error_message": "'rocm_hip_api' string not found in the table rocpd_string", - "expected_result": 1, + "expected_result": 0, "query": "SELECT COUNT(*) FROM rocpd_string WHERE string LIKE '%rocm_hip_api%';" } ] @@ -144,7 +144,7 @@ "comparison": "greater_than", "description": "Verify that 'rocm_hsa_api' string is present in the table", "error_message": "'rocm_hsa_api' string not found in the table rocpd_string", - "expected_result": 1, + "expected_result": 0, "query": "SELECT COUNT(*) FROM rocpd_string WHERE string LIKE '%rocm_hsa_api%';" } ] diff --git a/projects/rocprofiler-systems/tests/rocpd-validation-rules/video-decode/sdk-metrics-rules.json b/projects/rocprofiler-systems/tests/rocpd-validation-rules/video-decode/sdk-metrics-rules.json index 4f38e2d6c7..d04c4fd6ea 100644 --- a/projects/rocprofiler-systems/tests/rocpd-validation-rules/video-decode/sdk-metrics-rules.json +++ b/projects/rocprofiler-systems/tests/rocpd-validation-rules/video-decode/sdk-metrics-rules.json @@ -73,7 +73,7 @@ "comparison": "greater_than", "description": "Verify that 'rocm_rocdecode_api' string is present in the table", "error_message": "'rocm_rocdecode_api' string not found in the table rocpd_string", - "expected_result": 1, + "expected_result": 0, "query": "SELECT COUNT(*) FROM rocpd_string WHERE string LIKE '%rocm_rocdecode_api%';" } ] @@ -148,10 +148,10 @@ ], "validation_queries": [ { - "comparison": "greater_than_or_equal", + "comparison": "greater_than", "description": "Verify that 'rocm_hip_api' string is present in the table", "error_message": "'rocm_hip_api' string not found in the table rocpd_string", - "expected_result": 1, + "expected_result": 0, "query": "SELECT COUNT(*) FROM rocpd_string WHERE string LIKE '%rocm_hip_api%';" } ] diff --git a/projects/rocprofiler-systems/tests/rocprof-sys-decode-tests.cmake b/projects/rocprofiler-systems/tests/rocprof-sys-decode-tests.cmake index 4c86388726..987a7902f0 100644 --- a/projects/rocprofiler-systems/tests/rocprof-sys-decode-tests.cmake +++ b/projects/rocprofiler-systems/tests/rocprof-sys-decode-tests.cmake @@ -90,7 +90,7 @@ rocprofiler_systems_add_validation_test( ARGS -l rocDecCreateVideoParser -c 2 -d 1 ${_vcn_counter_names} -p ) -if(${ENABLE_ROCPD_TEST} AND ${_VALID_GPU}) +if(${ENABLE_ROCPD_TEST} AND ${_VALID_GPU} AND TEST video-decode-sampling) set_property(TEST video-decode-sampling APPEND PROPERTY LABELS rocpd) rocprofiler_systems_add_validation_test( @@ -126,7 +126,7 @@ rocprofiler_systems_add_validation_test( ARGS -l rocJpegCreate -c 1 -d 1 ${_jpeg_counter_names} -p ) -if(${ENABLE_ROCPD_TEST} AND ${_VALID_GPU}) +if(${ENABLE_ROCPD_TEST} AND ${_VALID_GPU} AND TEST jpeg-decode-sampling) set_property(TEST jpeg-decode-sampling APPEND PROPERTY LABELS rocpd) rocprofiler_systems_add_validation_test( diff --git a/projects/rocprofiler-systems/tests/rocprof-sys-openmp-tests.cmake b/projects/rocprofiler-systems/tests/rocprof-sys-openmp-tests.cmake index f44d909642..5fa0a38703 100644 --- a/projects/rocprofiler-systems/tests/rocprof-sys-openmp-tests.cmake +++ b/projects/rocprofiler-systems/tests/rocprof-sys-openmp-tests.cmake @@ -95,7 +95,7 @@ rocprofiler_systems_add_validation_test( -p ) -if(${ENABLE_ROCPD_TEST} AND ${_VALID_GPU}) +if(${ENABLE_ROCPD_TEST} AND ${_VALID_GPU} AND TEST openmp-target-sampling) set_property(TEST openmp-target-sampling APPEND PROPERTY LABELS rocpd) rocprofiler_systems_add_validation_test( diff --git a/projects/rocprofiler-systems/tests/rocprof-sys-rocm-tests.cmake b/projects/rocprofiler-systems/tests/rocprof-sys-rocm-tests.cmake index 9823d798f2..57f827ba50 100644 --- a/projects/rocprofiler-systems/tests/rocprof-sys-rocm-tests.cmake +++ b/projects/rocprofiler-systems/tests/rocprof-sys-rocm-tests.cmake @@ -164,7 +164,7 @@ endif() # # -------------------------------------------------------------------------------------- # -if(${ENABLE_ROCPD_TEST} AND ${_VALID_GPU}) +if(${ENABLE_ROCPD_TEST} AND ${_VALID_GPU} AND TEST transpose-sampling) set_property(TEST transpose-sampling APPEND PROPERTY LABELS rocpd) rocprofiler_systems_add_validation_test( diff --git a/projects/rocprofiler-systems/tests/rocprof-sys-roctx-tests.cmake b/projects/rocprofiler-systems/tests/rocprof-sys-roctx-tests.cmake index 740d1df0ab..6997934429 100644 --- a/projects/rocprofiler-systems/tests/rocprof-sys-roctx-tests.cmake +++ b/projects/rocprofiler-systems/tests/rocprof-sys-roctx-tests.cmake @@ -106,7 +106,7 @@ rocprofiler_systems_add_validation_test( ARGS -l ${ROCTX_LABEL} -c ${ROCTX_COUNT} -d ${ROCTX_DEPTH} -p ) -if(${ENABLE_ROCPD_TEST} AND ${_VALID_GPU}) +if(${ENABLE_ROCPD_TEST} AND ${_VALID_GPU} AND TEST transpose-sampling) set_property(TEST roctx-api-sampling APPEND PROPERTY LABELS rocpd) rocprofiler_systems_add_validation_test(