From f6e34b2cecd4e2b7272c077306efcffc7555d976 Mon Sep 17 00:00:00 2001 From: Jaydeep Patel Date: Wed, 17 Jan 2024 08:29:23 +0000 Subject: [PATCH] SWDEV-439298 - Correct odd/even logic. Change-Id: Iafe1b3915b513207a5ef24cf145ac1e8e39a1672 [ROCm/hip-tests commit: 3da249e472ccd183b58de6ea8a137b064e7605ac] --- .../catch/unit/cooperativeGrps/hipCGMultiGridGroupType_old.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/hip-tests/catch/unit/cooperativeGrps/hipCGMultiGridGroupType_old.cc b/projects/hip-tests/catch/unit/cooperativeGrps/hipCGMultiGridGroupType_old.cc index f5a8a14bc7..4a9886ecf6 100644 --- a/projects/hip-tests/catch/unit/cooperativeGrps/hipCGMultiGridGroupType_old.cc +++ b/projects/hip-tests/catch/unit/cooperativeGrps/hipCGMultiGridGroupType_old.cc @@ -218,7 +218,7 @@ static __global__ void test_kernel(unsigned int* atomic_val, unsigned int* globa unsigned grid_rank = mgrid.grid_rank(); unsigned inter_gpu_offset = (grid_rank + i) % mgrid.num_grids(); if (rank == (grid.size() - 1)) { - if (i % mgrid.num_grids() == 0) { + if (i % 2 == 0) { global_array[grid_rank] += 2; } else { global_array[inter_gpu_offset] *= 2;