@@ -20,8 +20,8 @@ ucs_status_t uct_cuda_ctx_primary_retain(CUdevice cuda_device, int force,
2020 CUcontext cuda_ctx ;
2121
2222 if (!force ) {
23- status = UCT_CUDADRV_FUNC_LOG_ERR (
24- cuDevicePrimaryCtxGetState ( cuda_device , & flags , & active ) );
23+ status = UCT_CUDADRV_FUNC_LOG_ERR (cuDevicePrimaryCtxGetState ,
24+ cuda_device , & flags , & active );
2525 if (status != UCS_OK ) {
2626 return status ;
2727 }
@@ -33,8 +33,8 @@ ucs_status_t uct_cuda_ctx_primary_retain(CUdevice cuda_device, int force,
3333 }
3434 }
3535
36- status = UCT_CUDADRV_FUNC_LOG_ERR (
37- cuDevicePrimaryCtxRetain ( & cuda_ctx , cuda_device ) );
36+ status = UCT_CUDADRV_FUNC_LOG_ERR (cuDevicePrimaryCtxRetain , & cuda_ctx ,
37+ cuda_device );
3838 if (status != UCS_OK ) {
3939 return status ;
4040 }
@@ -49,14 +49,14 @@ ucs_status_t uct_cuda_ctx_primary_push_first_active(CUdevice *cuda_device_p)
4949 ucs_status_t status ;
5050 CUdevice cuda_device ;
5151
52- status = UCT_CUDADRV_FUNC_LOG_ERR (cuDeviceGetCount ( & num_devices ) );
52+ status = UCT_CUDADRV_FUNC_LOG_ERR (cuDeviceGetCount , & num_devices );
5353 if (status != UCS_OK ) {
5454 return status ;
5555 }
5656
5757 for (device_index = 0 ; device_index < num_devices ; ++ device_index ) {
58- status = UCT_CUDADRV_FUNC_LOG_ERR (
59- cuDeviceGet ( & cuda_device , device_index ) );
58+ status = UCT_CUDADRV_FUNC_LOG_ERR (cuDeviceGet , & cuda_device ,
59+ device_index );
6060 if (status != UCS_OK ) {
6161 return status ;
6262 }
@@ -85,9 +85,9 @@ ucs_status_t uct_cuda_ctx_primary_push(CUdevice cuda_device, int retain_inactive
8585 return status ;
8686 }
8787
88- status = UCT_CUDADRV_FUNC (cuCtxPushCurrent ( primary_ctx ), log_level );
88+ status = UCT_CUDADRV_FUNC (log_level , cuCtxPushCurrent , primary_ctx );
8989 if (status != UCS_OK ) {
90- (void )UCT_CUDADRV_FUNC (cuDevicePrimaryCtxRelease ( cuda_device ), log_level );
90+ (void )UCT_CUDADRV_FUNC_LOG_WARN (cuDevicePrimaryCtxRelease , cuda_device );
9191 }
9292
9393 return status ;
@@ -102,7 +102,7 @@ ucs_status_t uct_cuda_ctx_primary_push_avail(int retain_inactive,
102102 ucs_status_t status ;
103103 int dev_ordinal , num_devices ;
104104
105- status = UCT_CUDADRV_FUNC_LOG_DEBUG (cuCtxGetDevice ( cuda_device_p ) );
105+ status = UCT_CUDADRV_FUNC_LOG_DEBUG (cuCtxGetDevice , cuda_device_p );
106106 if (status != UCS_OK ) {
107107 * cuda_device_p = CU_DEVICE_INVALID ;
108108 }
@@ -137,15 +137,15 @@ ucs_status_t uct_cuda_ctx_primary_push_avail(int retain_inactive,
137137 return UCS_OK ;
138138 }
139139
140- status = UCT_CUDADRV_FUNC (cuDeviceGetCount ( & num_devices ), UCS_LOG_LEVEL_DIAG );
140+ status = UCT_CUDADRV_FUNC_LOG_DIAG (cuDeviceGetCount , & num_devices );
141141 if (status != UCS_OK ) {
142142 return UCS_ERR_INVALID_PARAM ;
143143 }
144144
145145 /* Use the first active cuda device for allocation */
146146 for (dev_ordinal = 0 ; dev_ordinal < num_devices ; dev_ordinal ++ ) {
147- if (UCT_CUDADRV_FUNC_LOG_DEBUG (cuDeviceGet ( avail_cuda_device_p ,
148- dev_ordinal ) ) != UCS_OK ) {
147+ if (UCT_CUDADRV_FUNC_LOG_DEBUG (cuDeviceGet , avail_cuda_device_p ,
148+ dev_ordinal ) != UCS_OK ) {
149149 continue ;
150150 }
151151
@@ -162,6 +162,6 @@ ucs_status_t uct_cuda_ctx_primary_push_avail(int retain_inactive,
162162
163163void uct_cuda_ctx_primary_pop_and_release (CUdevice cuda_device )
164164{
165- (void )UCT_CUDADRV_FUNC_LOG_WARN (cuCtxPopCurrent ( NULL ) );
166- (void )UCT_CUDADRV_FUNC_LOG_WARN (cuDevicePrimaryCtxRelease ( cuda_device ) );
165+ (void )UCT_CUDADRV_FUNC_LOG_WARN (cuCtxPopCurrent , NULL );
166+ (void )UCT_CUDADRV_FUNC_LOG_WARN (cuDevicePrimaryCtxRelease , cuda_device );
167167}
0 commit comments