Skip to content

Commit 273faf1

Browse files
coll/cuda: fix issue in cuda check buffer
As `NULL` CUDA buffer cannot be considered as an error, return a zero return code instead of returning `OPAL_ERROR`. Signed-off-by: Aboorva Devarajan <abodevar@in.ibm.com>
1 parent 4e8bc42 commit 273faf1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ompi/mca/coll/cuda/coll_cuda.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ mca_coll_cuda_reduce_scatter_block(const void *sbuf, void *rbuf, int rcount,
7878
*
7979
* @param addr One pointer to check
8080
* @retval <0 An error has occurred.
81-
* @retval 0 The buffer does not belong to a managed buffer
81+
* @retval 0 The buffer is NULL or it does not belong to a managed buffer
8282
* in device memory.
8383
* @retval >0 The buffer belongs to a managed buffer in
8484
* device memory.
@@ -90,7 +90,7 @@ static inline int mca_coll_cuda_check_buf(void *addr)
9090
if (OPAL_LIKELY(NULL != addr)) {
9191
return opal_accelerator.check_addr(addr, &dev_id, &flags);
9292
} else {
93-
return OPAL_ERROR;
93+
return 0;
9494
}
9595
}
9696

0 commit comments

Comments
 (0)