Skip to content

Commit e500a85

Browse files
committed
cuda: Fix return value from cuMemAlloc wrapper
Previously, the function returned 0 even if an error occurred. Signed-off-by: Eric Raut <eraut@amazon.com>
1 parent 8ea702f commit e500a85

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/nccl_ofi_cuda.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ int nccl_net_ofi_gpu_mem_alloc(void **ptr, size_t size)
199199
CUdeviceptr d_ptr;
200200
CUresult ret = pfn_cuMemAlloc(&d_ptr, size);
201201
if (ret != CUDA_SUCCESS) {
202-
return false;
202+
return -EINVAL;
203203
}
204204

205205
*ptr = (void *)d_ptr;

0 commit comments

Comments
 (0)