File tree Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -48,16 +48,14 @@ const char *uct_cuda_base_cu_get_error_string(CUresult result);
4848
4949#define UCT_CUDADRV_FUNC (_func , _log_level ) \
5050 ({ \
51- ucs_status_t _status = UCS_OK; \
52- do { \
53- CUresult _result = (_func); \
54- if (CUDA_ERROR_NOT_READY == _result) { \
55- _status = UCS_INPROGRESS; \
56- } else if (CUDA_SUCCESS != _result) { \
57- UCT_CUDADRV_LOG(_func, _log_level, _result); \
58- _status = UCS_ERR_IO_ERROR; \
59- } \
60- } while (0); \
51+ CUresult _result = (_func); \
52+ ucs_status_t _status; \
53+ if (ucs_likely(_result == CUDA_SUCCESS)) { \
54+ _status = UCS_OK; \
55+ } else { \
56+ UCT_CUDADRV_LOG(_func, _log_level, _result); \
57+ _status = UCS_ERR_IO_ERROR; \
58+ } \
6159 _status; \
6260 })
6361
You can’t perform that action at this time.
0 commit comments