@@ -110,8 +110,8 @@ bool checkResult(CUresult Err, const char *ErrMsg) {
110
110
111
111
int memcpyDtoD (const void *SrcPtr, void *DstPtr, int64_t Size,
112
112
CUstream Stream) {
113
- CUresult Err = cuMemcpyDtoDAsync_v2 ((CUdeviceptr)DstPtr, (CUdeviceptr)SrcPtr,
114
- Size, Stream);
113
+ CUresult Err =
114
+ cuMemcpyDtoDAsync ((CUdeviceptr)DstPtr, (CUdeviceptr)SrcPtr, Size, Stream);
115
115
116
116
if (Err != CUDA_SUCCESS) {
117
117
REPORT (" Error when copying data from device to device. Pointers: src "
@@ -207,8 +207,8 @@ class StreamManagerTy {
207
207
208
208
for (CUstream &S : StreamPool[I]) {
209
209
if (S)
210
- checkResult (cuStreamDestroy_v2 (S),
211
- " Error returned from cuStreamDestroy_v2 \n " );
210
+ checkResult (cuStreamDestroy (S),
211
+ " Error returned from cuStreamDestroy \n " );
212
212
}
213
213
}
214
214
}
@@ -311,8 +311,8 @@ class DeviceRTLTy {
311
311
return nullptr ;
312
312
313
313
CUdeviceptr DevicePtr;
314
- Err = cuMemAlloc_v2 (&DevicePtr, Size);
315
- if (!checkResult (Err, " Error returned from cuMemAlloc_v2 \n " ))
314
+ Err = cuMemAlloc (&DevicePtr, Size);
315
+ if (!checkResult (Err, " Error returned from cuMemAlloc \n " ))
316
316
return nullptr ;
317
317
318
318
return (void *)DevicePtr;
@@ -323,8 +323,8 @@ class DeviceRTLTy {
323
323
if (!checkResult (Err, " Error returned from cuCtxSetCurrent\n " ))
324
324
return OFFLOAD_FAIL;
325
325
326
- Err = cuMemFree_v2 ((CUdeviceptr)TgtPtr);
327
- if (!checkResult (Err, " Error returned from cuMemFree_v2 \n " ))
326
+ Err = cuMemFree ((CUdeviceptr)TgtPtr);
327
+ if (!checkResult (Err, " Error returned from cuMemFree \n " ))
328
328
return OFFLOAD_FAIL;
329
329
330
330
return OFFLOAD_SUCCESS;
@@ -466,8 +466,8 @@ class DeviceRTLTy {
466
466
CUdevice Device;
467
467
checkResult (cuCtxGetDevice (&Device),
468
468
" Error returned from cuCtxGetDevice\n " );
469
- checkResult (cuDevicePrimaryCtxRelease_v2 (Device),
470
- " Error returned from cuDevicePrimaryCtxRelease_v2 \n " );
469
+ checkResult (cuDevicePrimaryCtxRelease (Device),
470
+ " Error returned from cuDevicePrimaryCtxRelease \n " );
471
471
}
472
472
}
473
473
}
@@ -506,9 +506,8 @@ class DeviceRTLTy {
506
506
} else {
507
507
DP (" The primary context is inactive, set its flags to "
508
508
" CU_CTX_SCHED_BLOCKING_SYNC\n " );
509
- Err = cuDevicePrimaryCtxSetFlags_v2 (Device, CU_CTX_SCHED_BLOCKING_SYNC);
510
- if (!checkResult (Err,
511
- " Error returned from cuDevicePrimaryCtxSetFlags_v2\n " ))
509
+ Err = cuDevicePrimaryCtxSetFlags (Device, CU_CTX_SCHED_BLOCKING_SYNC);
510
+ if (!checkResult (Err, " Error returned from cuDevicePrimaryCtxSetFlags\n " ))
512
511
return OFFLOAD_FAIL;
513
512
}
514
513
@@ -657,7 +656,7 @@ class DeviceRTLTy {
657
656
__tgt_offload_entry Entry = *E;
658
657
CUdeviceptr CUPtr;
659
658
size_t CUSize;
660
- Err = cuModuleGetGlobal_v2 (&CUPtr, &CUSize, Module, E->name );
659
+ Err = cuModuleGetGlobal (&CUPtr, &CUSize, Module, E->name );
661
660
// We keep this style here because we need the name
662
661
if (Err != CUDA_SUCCESS) {
663
662
REPORT (" Loading global '%s' Failed\n " , E->name );
@@ -689,7 +688,7 @@ class DeviceRTLTy {
689
688
// If unified memory is present any target link or to variables
690
689
// can access host addresses directly. There is no longer a
691
690
// need for device copies.
692
- cuMemcpyHtoD_v2 (CUPtr, E->addr , sizeof (void *));
691
+ cuMemcpyHtoD (CUPtr, E->addr , sizeof (void *));
693
692
DP (" Copy linked variable host address (" DPxMOD
694
693
" ) to device address (" DPxMOD " )\n " ,
695
694
DPxPTR (*((void **)E->addr )), DPxPTR (CUPtr));
@@ -720,15 +719,15 @@ class DeviceRTLTy {
720
719
721
720
CUdeviceptr ExecModePtr;
722
721
size_t CUSize;
723
- Err = cuModuleGetGlobal_v2 (&ExecModePtr, &CUSize, Module, ExecModeName);
722
+ Err = cuModuleGetGlobal (&ExecModePtr, &CUSize, Module, ExecModeName);
724
723
if (Err == CUDA_SUCCESS) {
725
724
if (CUSize != sizeof (int8_t )) {
726
725
DP (" Loading global exec_mode '%s' - size mismatch (%zd != %zd)\n " ,
727
726
ExecModeName, CUSize, sizeof (int8_t ));
728
727
return nullptr ;
729
728
}
730
729
731
- Err = cuMemcpyDtoH_v2 (&ExecModeVal, ExecModePtr, CUSize);
730
+ Err = cuMemcpyDtoH (&ExecModeVal, ExecModePtr, CUSize);
732
731
if (Err != CUDA_SUCCESS) {
733
732
REPORT (" Error when copying data from device to host. Pointers: "
734
733
" host = " DPxMOD " , device = " DPxMOD " , size = %zd\n " ,
@@ -769,7 +768,7 @@ class DeviceRTLTy {
769
768
CUdeviceptr DeviceEnvPtr;
770
769
size_t CUSize;
771
770
772
- Err = cuModuleGetGlobal_v2 (&DeviceEnvPtr, &CUSize, Module, DeviceEnvName);
771
+ Err = cuModuleGetGlobal (&DeviceEnvPtr, &CUSize, Module, DeviceEnvName);
773
772
if (Err == CUDA_SUCCESS) {
774
773
if (CUSize != sizeof (DeviceEnv)) {
775
774
REPORT (
@@ -779,7 +778,7 @@ class DeviceRTLTy {
779
778
return nullptr ;
780
779
}
781
780
782
- Err = cuMemcpyHtoD_v2 (DeviceEnvPtr, &DeviceEnv, CUSize);
781
+ Err = cuMemcpyHtoD (DeviceEnvPtr, &DeviceEnv, CUSize);
783
782
if (Err != CUDA_SUCCESS) {
784
783
REPORT (" Error when copying data from host to device. Pointers: "
785
784
" host = " DPxMOD " , device = " DPxMOD " , size = %zu\n " ,
@@ -817,7 +816,7 @@ class DeviceRTLTy {
817
816
818
817
CUstream Stream = getStream (DeviceId, AsyncInfoPtr);
819
818
820
- Err = cuMemcpyHtoDAsync_v2 ((CUdeviceptr)TgtPtr, HstPtr, Size, Stream);
819
+ Err = cuMemcpyHtoDAsync ((CUdeviceptr)TgtPtr, HstPtr, Size, Stream);
821
820
if (Err != CUDA_SUCCESS) {
822
821
REPORT (" Error when copying data from host to device. Pointers: host "
823
822
" = " DPxMOD " , device = " DPxMOD " , size = %" PRId64 " \n " ,
@@ -839,7 +838,7 @@ class DeviceRTLTy {
839
838
840
839
CUstream Stream = getStream (DeviceId, AsyncInfoPtr);
841
840
842
- Err = cuMemcpyDtoHAsync_v2 (HstPtr, (CUdeviceptr)TgtPtr, Size, Stream);
841
+ Err = cuMemcpyDtoHAsync (HstPtr, (CUdeviceptr)TgtPtr, Size, Stream);
843
842
if (Err != CUDA_SUCCESS) {
844
843
REPORT (" Error when copying data from device to host. Pointers: host "
845
844
" = " DPxMOD " , device = " DPxMOD " , size = %" PRId64 " \n " ,
0 commit comments