From d9bd0903f8506cf68bb0f8b037f94529880cd23e Mon Sep 17 00:00:00 2001 From: "Kandula, Venkateshwar reddy" Date: Thu, 1 May 2025 00:58:00 -0500 Subject: [PATCH] [PSDB] [CI] SWDEV-528922: Modify summary MEMORY_ALLOCATION for summary.txt (#375) * Update validate.py * increase memalloc to 4 to account new vmem. * Format. * modify test to work when vmem using and not to work. * address comments. --------- Co-authored-by: Venkateshwar Reddy Kandula [ROCm/rocprofiler-sdk commit: b69e12032eeb9de7b65944021b2a42c881db9c45] --- .../tests/rocprofv3/summary/validate.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/projects/rocprofiler-sdk/tests/rocprofv3/summary/validate.py b/projects/rocprofiler-sdk/tests/rocprofv3/summary/validate.py index fee66d2f2b..f5d34b62ea 100644 --- a/projects/rocprofiler-sdk/tests/rocprofv3/summary/validate.py +++ b/projects/rocprofiler-sdk/tests/rocprofv3/summary/validate.py @@ -295,12 +295,18 @@ def test_summary_display_data(json_data, summary_data): assert get_dims(marker) == [7, 9], f"{marker}" assert get_dims(memcpy) == [2, 9], f"{memcpy}" - assert get_dims(memalloc) == [2, 9], f"{memalloc}" + assert get_dims(memalloc) in ( + [2, 9], # [2,9] when hip-runtime doesn't use vmem. + [4, 9], + ), f"{memalloc}" assert get_dims(dispatch) == [3, 9], f"{dispatch}" assert get_dims(dispatch_and_copy) == [5, 9], f"{dispatch_and_copy}" assert get_dims(hip) == [14, 9], f"{hip}" assert get_dims(hip_and_marker) == expected_hip_and_marker_dims, f"{hip_and_marker}" - assert get_dims(total) == [25, 9], f"{total}" + if get_dims(memalloc) == [2, 9]: # [2,9] when hip-runtime doesn't use vmem alloc. + assert get_dims(total) == [25, 9], f"{total}" + elif get_dims(memalloc) == [4, 9]: + assert get_dims(total) == [27, 9], f"{total}" def test_perfetto_data(pftrace_data, json_data):