Skip to content

Commit

Permalink
Fixes #673: No longer accessing an array in simpleIPC.cu before it …
Browse files Browse the repository at this point in the history
…is known to be initialized
  • Loading branch information
eyalroz committed Sep 5, 2024
1 parent d1d329c commit 0729def
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/modified_cuda_samples/simpleIPC/simpleIPC.cu
Original file line number Diff line number Diff line change
Expand Up @@ -128,14 +128,14 @@ void getDeviceCount(ipcDevices_t *devices)
}
}

devices->ordinals[0] = uvaOrdinals[0];

if (uvaCount < 2)
{
devices->count = uvaCount;
exit(EXIT_SUCCESS);
}

devices->ordinals[0] = uvaOrdinals[0];

// Check possibility for peer accesses, relevant to our tests
printf("\nChecking GPU(s) for support of peer to peer memory access...\n");
devices->count = 1;
Expand Down

0 comments on commit 0729def

Please sign in to comment.