From 90d5dc6b3af104e514f3e8027738436c3abe7e18 Mon Sep 17 00:00:00 2001 From: Sourabh U Betigeri Date: Thu, 6 Nov 2025 13:45:36 -0800 Subject: [PATCH] SWDEV-564408 - Reduces hip-tests runtime Pt 1 (#1695) * SWDEV-564408 - Reduces hip-tests runtime Pt 1 * Update cmd_options.hh --- .../catch/unit/cooperativeGrps/coalesced_group.cc | 8 ++++++-- projects/hip-tests/catch/unit/memory/hipHostAlloc.cc | 2 +- projects/hip-tests/catch/unit/memory/hipHostMalloc.cc | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/projects/hip-tests/catch/unit/cooperativeGrps/coalesced_group.cc b/projects/hip-tests/catch/unit/cooperativeGrps/coalesced_group.cc index 48c84191ca..93101d8e9c 100644 --- a/projects/hip-tests/catch/unit/cooperativeGrps/coalesced_group.cc +++ b/projects/hip-tests/catch/unit/cooperativeGrps/coalesced_group.cc @@ -421,7 +421,9 @@ template void CoalescedGroupShflUpTestImpl() { INFO("Coalesced group mask: " << active_mask); unsigned int active_thread_count = get_active_thread_count(active_mask, warp_size); - auto delta = GENERATE(range(static_cast(0), static_cast(getWarpSize()))); + // Tests edge cases (0, 1, max-1) and middle values + auto delta = GENERATE(values({0, 1, static_cast(getWarpSize()/2), + static_cast(getWarpSize()-1)})); delta = delta % active_thread_count; INFO("Delta: " << delta); CPUGrid grid(blocks, threads); @@ -501,7 +503,9 @@ template void CoalescedGroupShflDownTest() { INFO("Coalesced group mask: " << active_mask); unsigned int active_thread_count = get_active_thread_count(active_mask, warp_size); - auto delta = GENERATE(range(static_cast(0), static_cast(getWarpSize()))); + // Tests edge cases (0, 1, max-1) and middle values + auto delta = GENERATE(values({0, 1, static_cast(getWarpSize()/2), + static_cast(getWarpSize()-1)})); delta = delta % active_thread_count; INFO("Delta: " << delta); CPUGrid grid(blocks, threads); diff --git a/projects/hip-tests/catch/unit/memory/hipHostAlloc.cc b/projects/hip-tests/catch/unit/memory/hipHostAlloc.cc index 55d53f3d08..6882b55cfc 100644 --- a/projects/hip-tests/catch/unit/memory/hipHostAlloc.cc +++ b/projects/hip-tests/catch/unit/memory/hipHostAlloc.cc @@ -28,7 +28,7 @@ THE SOFTWARE. #include #include -#define MEMORY_PERCENT 10 +#define MEMORY_PERCENT 5 #define BLOCK_SIZE 512 #define VALUE 32 diff --git a/projects/hip-tests/catch/unit/memory/hipHostMalloc.cc b/projects/hip-tests/catch/unit/memory/hipHostMalloc.cc index 8b9e9318d6..3bc1f0c20b 100644 --- a/projects/hip-tests/catch/unit/memory/hipHostMalloc.cc +++ b/projects/hip-tests/catch/unit/memory/hipHostMalloc.cc @@ -38,7 +38,7 @@ This testfile verifies the following scenarios of hipHostMalloc API #define SYNC_EVENT 0 #define SYNC_STREAM 1 #define SYNC_DEVICE 2 -#define MEMORY_PERCENT 10 +#define MEMORY_PERCENT 5 #define BLOCK_SIZE 512 #define VALUE 32