Skip to content

Commit

Permalink
SWDEV-439298 - Correct odd/even logic.
Browse files Browse the repository at this point in the history
Change-Id: Iafe1b3915b513207a5ef24cf145ac1e8e39a1672
(cherry picked from commit 3da249e)
  • Loading branch information
jaydeeppatel1111 authored and yanyao-wang committed Apr 3, 2024
1 parent 94b1aef commit 8b79573
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion catch/unit/cooperativeGrps/hipCGMultiGridGroupType_old.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 8b79573

Please sign in to comment.