From 0729def8b138ebdd100a85f8bc349aa778a4a010 Mon Sep 17 00:00:00 2001 From: Eyal Rozenberg Date: Thu, 5 Sep 2024 22:46:41 +0300 Subject: [PATCH] Fixes #673: No longer accessing an array in `simpleIPC.cu` before it is known to be initialized --- examples/modified_cuda_samples/simpleIPC/simpleIPC.cu | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/modified_cuda_samples/simpleIPC/simpleIPC.cu b/examples/modified_cuda_samples/simpleIPC/simpleIPC.cu index 3b9a8910..c415b403 100644 --- a/examples/modified_cuda_samples/simpleIPC/simpleIPC.cu +++ b/examples/modified_cuda_samples/simpleIPC/simpleIPC.cu @@ -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;