Skip to content

Commit 2ba34a6

Browse files
authored
Fix [[nodiscard]] cudaDeviceEnablePeerAccess warning in gloo
Differential Revision: D96004741 Pull Request resolved: #498
1 parent 845824e commit 2ba34a6

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

gloo/cuda_collectives_native.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ class CudaLocalNativeReduce : public LocalOp<T> {
8383

8484
// Enable peer access for devA to memory on devB
8585
CUDA_CHECK(cudaSetDevice(devA));
86-
cudaDeviceEnablePeerAccess(devB, 0);
86+
(void)cudaDeviceEnablePeerAccess(devB, 0);
8787

8888
// Use cudaGetLastError so that any error is cleared.
8989
auto err = cudaGetLastError();
@@ -196,7 +196,7 @@ class CudaLocalNativeBroadcast : public LocalOp<T> {
196196

197197
// Enable peer access for devA to memory on devB
198198
CUDA_CHECK(cudaSetDevice(devA));
199-
cudaDeviceEnablePeerAccess(devB, 0);
199+
(void)cudaDeviceEnablePeerAccess(devB, 0);
200200

201201
// Use cudaGetLastError so that any error is cleared.
202202
auto err = cudaGetLastError();

0 commit comments

Comments
 (0)