diff options
| author | J <[email protected]> | 2018-08-14 13:18:16 -0700 |
|---|---|---|
| committer | J <[email protected]> | 2018-08-14 13:18:16 -0700 |
| commit | ad445852809eadbfd934b656fe8541d4ca5826d9 (patch) | |
| tree | 5d5ad305395e067d53ccc37da7128d537b226433 /libcuda/cuda_runtime_api.cc | |
| parent | be5f1e4b948b484c405c0ca7e7692872bca7172e (diff) | |
added symbols that pytorch needs; implemented cuDeviceGet, cuDeviceGetName, cuDeviceGetAttribute; cuGetExportTable and cuDeviceTotalMem has dummy values
Diffstat (limited to 'libcuda/cuda_runtime_api.cc')
| -rw-r--r-- | libcuda/cuda_runtime_api.cc | 407 |
1 files changed, 292 insertions, 115 deletions
diff --git a/libcuda/cuda_runtime_api.cc b/libcuda/cuda_runtime_api.cc index 20d2985..b43a9ef 100644 --- a/libcuda/cuda_runtime_api.cc +++ b/libcuda/cuda_runtime_api.cc @@ -126,7 +126,8 @@ #include "host_defines.h" #include "builtin_types.h" #include "driver_types.h" -#include "cuda.h" +#include "cuda_api.h" +#include "cudaProfiler.h" #if (CUDART_VERSION < 8000) #include "__cudaFatFormat.h" #endif @@ -963,6 +964,9 @@ __host__ cudaError_t CUDARTAPI cudaDeviceGetAttribute(int *value, enum cudaDevic if (device <= dev->num_devices() ) { prop = dev->get_prop(); switch (attr) { + case 1: + *value= prop->maxThreadsDim[0] * prop->maxThreadsDim[1] * prop->maxThreadsDim[2] * prop->maxGridSize[0] * prop->maxGridSize[1] * prop->maxGridSize[2]; + break; case 2: *value= prop->maxThreadsDim[0]; break; @@ -990,21 +994,111 @@ __host__ cudaError_t CUDARTAPI cudaDeviceGetAttribute(int *value, enum cudaDevic case 10: *value= prop->warpSize; break; + case 11: + *value= 16;//dummy value + break; case 12: *value= prop->regsPerBlock; break; + case 13: + *value= 1480000;//for 1080ti + break; case 14: *value= prop->textureAlignment ; break; + case 15: + *value = 0; + break; case 16: *value= prop->multiProcessorCount ; break; - case 34: + case 17: + case 18: + case 19: + *value = 0; + break; + case 21: + case 22: + case 23: + case 24: + case 25: + case 26: + case 27: + case 28: + case 42: + case 45: + case 46: + case 47: + case 48: + case 49: + case 52: + case 53: + case 55: + case 56: + case 57: + case 58: + case 59: + case 60: + case 61: + case 62: + case 63: + case 64: + case 66: + case 67: + case 69: + case 70: + case 71: + case 73: + case 74: + case 77: + *value = 1000;//dummy value + break; + case 29: + case 43: + case 54: + case 65: + case 68: + case 72: + *value = 10;//dummy value + break; + case 30: + case 51: + *value = 128;//dummy value + break; + case 31: + *value = 1; + break; + case 32: + *value = 0; + break; + case 33: + case 50: + *value = 0;//dummy value + break; + case 34: *value= 0; break; + case 35: + *value = 0; + break; + case 36: + *value = 1250000;//CK value for 1080ti + break; + case 37: + *value = 352;//value for 1080ti + break; + case 38: + *value = 3000000;//value for 1080ti + break; case 39: *value= dev->get_gpgpu()->threads_per_core(); break; + case 40: + *value= 0; + break; + case 41: + *value= 0; + break; case 75: *value= 9 ; break; @@ -1014,12 +1108,31 @@ __host__ cudaError_t CUDARTAPI cudaDeviceGetAttribute(int *value, enum cudaDevic case 78: *value= 0 ; //TODO: as of now, we dont support stream priorities. break; + case 79: + *value= 0; + break; + case 80: + *value= 0; + break; case 81: *value= prop->sharedMemPerMultiprocessor; break; case 82: *value= prop->regsPerMultiprocessor; break; + case 83: + case 84: + case 85: + case 86: + *value= 0; + break; + case 87: + *value= 4;//dummy value + break; + case 88: + case 89: + *value= 0; + break; default: printf("ERROR: Attribute number %d unimplemented \n",attr); abort(); @@ -1565,6 +1678,21 @@ typedef struct CUuuid_st { /**< CUDA definition o #endif #if (CUDART_VERSION >= 3010) +int dummy0() { + if(g_debug_execution >= 3){ + announce_call(__my_func__); + } +return 0; } + +int dummy1() { + if(g_debug_execution >= 3){ + announce_call(__my_func__); + } +return 2 << 20; } + +typedef int (*ExportedFunction)(); + +static ExportedFunction exportTable[3] = {&dummy0, &dummy0, &dummy0}; __host__ cudaError_t CUDARTAPI cudaGetExportTable(const void **ppExportTable, const cudaUUID_t *pExportTableId) { @@ -1575,6 +1703,8 @@ __host__ cudaError_t CUDARTAPI cudaGetExportTable(const void **ppExportTable, co for (int s = 0; s < 16; s++) { printf("%#2x ", (unsigned char) (pExportTableId->bytes[s])); } + *ppExportTable = &exportTable; + printf("\n"); return g_last_cudaError = cudaSuccess; } @@ -1773,7 +1903,7 @@ void extract_ptx_files_using_cuobjdump(){ close(fd2); if (pytorch_path!=NULL && strlen(pytorch_path)!=0){ - app_binary = std::string(std::string(pytorch_path) + "/libATen.so"); + app_binary = std::string(std::string(pytorch_path) + "/vectorAdd"); } //only want file names @@ -3087,8 +3217,11 @@ CUresult CUDAAPI cuDeviceGet(CUdevice *device, int ordinal) if(g_debug_execution >= 3){ announce_call(__my_func__); } - CUctx_st* context = GPGPUSim_Context(); - *device = context->get_device()->get_id(); + int deviceI = -1; + cudaError_t e = cudaGetDevice(&deviceI); + assert(e == cudaSuccess); + assert(deviceI!=-1); + *device = deviceI; return CUDA_SUCCESS; } @@ -3107,7 +3240,8 @@ CUresult CUDAAPI cuDeviceGetName(char *name, int len, CUdevice dev) if(g_debug_execution >= 3){ announce_call(__my_func__); } - printf("WARNING: this function has not been implemented yet."); + assert(len>=10); + strcpy(name, "GPGPU-Sim"); return CUDA_SUCCESS; } @@ -3117,7 +3251,7 @@ CUresult CUDAAPI cuDeviceTotalMem(size_t *bytes, CUdevice dev) if(g_debug_execution >= 3){ announce_call(__my_func__); } - printf("WARNING: this function has not been implemented yet."); + *bytes = 20000000000;//dummy value return CUDA_SUCCESS; } #endif /* CUDART_VERSION >= 3020 */ @@ -3127,7 +3261,9 @@ CUresult CUDAAPI cuDeviceGetAttribute(int *pi, CUdevice_attribute attrib, CUdevi if(g_debug_execution >= 3){ announce_call(__my_func__); } - printf("WARNING: this function has not been implemented yet."); + cudaError_t e = cudaDeviceGetAttribute(pi, (cudaDeviceAttr)attrib, dev); + assert(e == cudaSuccess); + return CUDA_SUCCESS; } @@ -5134,9 +5270,8 @@ CUresult CUDAAPI cuTexRefSetAddress2D_v2(CUtexref hTexRef, const CUDA_ARRAY_DESC } #endif /* CUDART_VERSION_INTERNAL || (CUDART_VERSION >= 3020 && CUDART_VERSION < 4010) */ -#if defined(CUDART_VERSION_INTERNAL) || CUDART_VERSION < 3020 - -CUresult CUDAAPI cuDeviceTotalMem(unsigned int *bytes, CUdevice dev) +#if defined(CUDART_VERSION_INTERNAL) || CUDART_VERSION < 4000 +CUresult CUDAAPI cuCtxDestroy(CUcontext ctx) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5144,7 +5279,7 @@ CUresult CUDAAPI cuDeviceTotalMem(unsigned int *bytes, CUdevice dev) printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } -CUresult CUDAAPI cuCtxCreate(CUcontext *pctx, unsigned int flags, CUdevice dev) +CUresult CUDAAPI cuCtxPopCurrent(CUcontext *pctx) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5152,7 +5287,7 @@ CUresult CUDAAPI cuCtxCreate(CUcontext *pctx, unsigned int flags, CUdevice dev) printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } -CUresult CUDAAPI cuModuleGetGlobal(CUdeviceptr *dptr, unsigned int *bytes, CUmodule hmod, const char *name) +CUresult CUDAAPI cuCtxPushCurrent(CUcontext ctx) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5160,7 +5295,7 @@ CUresult CUDAAPI cuModuleGetGlobal(CUdeviceptr *dptr, unsigned int *bytes, CUmod printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } -CUresult CUDAAPI cuMemGetInfo(unsigned int *free, unsigned int *total) +CUresult CUDAAPI cuStreamDestroy(CUstream hStream) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5168,7 +5303,7 @@ CUresult CUDAAPI cuMemGetInfo(unsigned int *free, unsigned int *total) printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } -CUresult CUDAAPI cuMemAlloc(CUdeviceptr *dptr, unsigned int bytesize) +CUresult CUDAAPI cuEventDestroy(CUevent hEvent) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5176,7 +5311,10 @@ CUresult CUDAAPI cuMemAlloc(CUdeviceptr *dptr, unsigned int bytesize) printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } -CUresult CUDAAPI cuMemAllocPitch(CUdeviceptr *dptr, unsigned int *pPitch, unsigned int WidthInBytes, unsigned int Height, unsigned int ElementSizeBytes) +#endif /* CUDART_VERSION_INTERNAL || CUDART_VERSION < 4000 */ + +#if defined(CUDART_VERSION_INTERNAL) + CUresult CUDAAPI cuMemcpyHtoD_v2(CUdeviceptr dstDevice, const void *srcHost, size_t ByteCount) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5184,7 +5322,7 @@ CUresult CUDAAPI cuMemAllocPitch(CUdeviceptr *dptr, unsigned int *pPitch, unsign printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } -CUresult CUDAAPI cuMemFree(CUdeviceptr dptr) + CUresult CUDAAPI cuMemcpyDtoH_v2(void *dstHost, CUdeviceptr srcDevice, size_t ByteCount) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5192,7 +5330,7 @@ CUresult CUDAAPI cuMemFree(CUdeviceptr dptr) printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } -CUresult CUDAAPI cuMemGetAddressRange(CUdeviceptr *pbase, unsigned int *psize, CUdeviceptr dptr) + CUresult CUDAAPI cuMemcpyDtoD_v2(CUdeviceptr dstDevice, CUdeviceptr srcDevice, size_t ByteCount) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5200,7 +5338,7 @@ CUresult CUDAAPI cuMemGetAddressRange(CUdeviceptr *pbase, unsigned int *psize, C printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } -CUresult CUDAAPI cuMemAllocHost(void **pp, unsigned int bytesize) + CUresult CUDAAPI cuMemcpyDtoA_v2(CUarray dstArray, size_t dstOffset, CUdeviceptr srcDevice, size_t ByteCount) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5208,7 +5346,7 @@ CUresult CUDAAPI cuMemAllocHost(void **pp, unsigned int bytesize) printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } -CUresult CUDAAPI cuMemHostGetDevicePointer(CUdeviceptr *pdptr, void *p, unsigned int Flags) + CUresult CUDAAPI cuMemcpyAtoD_v2(CUdeviceptr dstDevice, CUarray srcArray, size_t srcOffset, size_t ByteCount) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5216,7 +5354,7 @@ CUresult CUDAAPI cuMemHostGetDevicePointer(CUdeviceptr *pdptr, void *p, unsigned printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } -CUresult CUDAAPI cuMemcpyHtoD(CUdeviceptr dstDevice, const void *srcHost, unsigned int ByteCount) + CUresult CUDAAPI cuMemcpyHtoA_v2(CUarray dstArray, size_t dstOffset, const void *srcHost, size_t ByteCount) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5224,7 +5362,7 @@ CUresult CUDAAPI cuMemcpyHtoD(CUdeviceptr dstDevice, const void *srcHost, unsign printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } -CUresult CUDAAPI cuMemcpyDtoH(void *dstHost, CUdeviceptr srcDevice, unsigned int ByteCount) + CUresult CUDAAPI cuMemcpyAtoH_v2(void *dstHost, CUarray srcArray, size_t srcOffset, size_t ByteCount) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5232,7 +5370,7 @@ CUresult CUDAAPI cuMemcpyDtoH(void *dstHost, CUdeviceptr srcDevice, unsigned int printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } -CUresult CUDAAPI cuMemcpyDtoD(CUdeviceptr dstDevice, CUdeviceptr srcDevice, unsigned int ByteCount) + CUresult CUDAAPI cuMemcpyAtoA_v2(CUarray dstArray, size_t dstOffset, CUarray srcArray, size_t srcOffset, size_t ByteCount) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5240,7 +5378,7 @@ CUresult CUDAAPI cuMemcpyDtoD(CUdeviceptr dstDevice, CUdeviceptr srcDevice, unsi printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } -CUresult CUDAAPI cuMemcpyDtoA(CUarray dstArray, unsigned int dstOffset, CUdeviceptr srcDevice, unsigned int ByteCount) + CUresult CUDAAPI cuMemcpyHtoAAsync_v2(CUarray dstArray, size_t dstOffset, const void *srcHost, size_t ByteCount, CUstream hStream) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5248,7 +5386,7 @@ CUresult CUDAAPI cuMemcpyDtoA(CUarray dstArray, unsigned int dstOffset, CUdevice printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } -CUresult CUDAAPI cuMemcpyAtoD(CUdeviceptr dstDevice, CUarray srcArray, unsigned int srcOffset, unsigned int ByteCount) + CUresult CUDAAPI cuMemcpyAtoHAsync_v2(void *dstHost, CUarray srcArray, size_t srcOffset, size_t ByteCount, CUstream hStream) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5256,7 +5394,7 @@ CUresult CUDAAPI cuMemcpyAtoD(CUdeviceptr dstDevice, CUarray srcArray, unsigned printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } -CUresult CUDAAPI cuMemcpyHtoA(CUarray dstArray, unsigned int dstOffset, const void *srcHost, unsigned int ByteCount) + CUresult CUDAAPI cuMemcpy2D_v2(const CUDA_MEMCPY2D *pCopy) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5264,7 +5402,7 @@ CUresult CUDAAPI cuMemcpyHtoA(CUarray dstArray, unsigned int dstOffset, const vo printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } -CUresult CUDAAPI cuMemcpyAtoH(void *dstHost, CUarray srcArray, unsigned int srcOffset, unsigned int ByteCount) + CUresult CUDAAPI cuMemcpy2DUnaligned_v2(const CUDA_MEMCPY2D *pCopy) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5272,7 +5410,7 @@ CUresult CUDAAPI cuMemcpyAtoH(void *dstHost, CUarray srcArray, unsigned int srcO printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } -CUresult CUDAAPI cuMemcpyAtoA(CUarray dstArray, unsigned int dstOffset, CUarray srcArray, unsigned int srcOffset, unsigned int ByteCount) + CUresult CUDAAPI cuMemcpy3D_v2(const CUDA_MEMCPY3D *pCopy) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5280,7 +5418,7 @@ CUresult CUDAAPI cuMemcpyAtoA(CUarray dstArray, unsigned int dstOffset, CUarray printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } -CUresult CUDAAPI cuMemcpyHtoAAsync(CUarray dstArray, unsigned int dstOffset, const void *srcHost, unsigned int ByteCount, CUstream hStream) + CUresult CUDAAPI cuMemcpyHtoDAsync_v2(CUdeviceptr dstDevice, const void *srcHost, size_t ByteCount, CUstream hStream) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5288,7 +5426,7 @@ CUresult CUDAAPI cuMemcpyHtoAAsync(CUarray dstArray, unsigned int dstOffset, con printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } -CUresult CUDAAPI cuMemcpyAtoHAsync(void *dstHost, CUarray srcArray, unsigned int srcOffset, unsigned int ByteCount, CUstream hStream) + CUresult CUDAAPI cuMemcpyDtoHAsync_v2(void *dstHost, CUdeviceptr srcDevice, size_t ByteCount, CUstream hStream) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5296,7 +5434,7 @@ CUresult CUDAAPI cuMemcpyAtoHAsync(void *dstHost, CUarray srcArray, unsigned int printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } -CUresult CUDAAPI cuMemcpy2D(const CUDA_MEMCPY2D *pCopy) + CUresult CUDAAPI cuMemcpyDtoDAsync_v2(CUdeviceptr dstDevice, CUdeviceptr srcDevice, size_t ByteCount, CUstream hStream) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5304,7 +5442,7 @@ CUresult CUDAAPI cuMemcpy2D(const CUDA_MEMCPY2D *pCopy) printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } -CUresult CUDAAPI cuMemcpy2DUnaligned(const CUDA_MEMCPY2D *pCopy) + CUresult CUDAAPI cuMemcpy2DAsync_v2(const CUDA_MEMCPY2D *pCopy, CUstream hStream) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5312,7 +5450,7 @@ CUresult CUDAAPI cuMemcpy2DUnaligned(const CUDA_MEMCPY2D *pCopy) printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } -CUresult CUDAAPI cuMemcpy3D(const CUDA_MEMCPY3D *pCopy) + CUresult CUDAAPI cuMemcpy3DAsync_v2(const CUDA_MEMCPY3D *pCopy, CUstream hStream) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5320,7 +5458,7 @@ CUresult CUDAAPI cuMemcpy3D(const CUDA_MEMCPY3D *pCopy) printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } -CUresult CUDAAPI cuMemcpyHtoDAsync(CUdeviceptr dstDevice, const void *srcHost, unsigned int ByteCount, CUstream hStream) + CUresult CUDAAPI cuMemsetD8_v2(CUdeviceptr dstDevice, unsigned char uc, size_t N) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5328,7 +5466,7 @@ CUresult CUDAAPI cuMemcpyHtoDAsync(CUdeviceptr dstDevice, const void *srcHost, u printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } -CUresult CUDAAPI cuMemcpyDtoHAsync(void *dstHost, CUdeviceptr srcDevice, unsigned int ByteCount, CUstream hStream) + CUresult CUDAAPI cuMemsetD16_v2(CUdeviceptr dstDevice, unsigned short us, size_t N) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5336,7 +5474,7 @@ CUresult CUDAAPI cuMemcpyDtoHAsync(void *dstHost, CUdeviceptr srcDevice, unsigne printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } -CUresult CUDAAPI cuMemcpyDtoDAsync(CUdeviceptr dstDevice, CUdeviceptr srcDevice, unsigned int ByteCount, CUstream hStream) + CUresult CUDAAPI cuMemsetD32_v2(CUdeviceptr dstDevice, unsigned int ui, size_t N) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5344,7 +5482,7 @@ CUresult CUDAAPI cuMemcpyDtoDAsync(CUdeviceptr dstDevice, CUdeviceptr srcDevice, printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } -CUresult CUDAAPI cuMemcpy2DAsync(const CUDA_MEMCPY2D *pCopy, CUstream hStream) + CUresult CUDAAPI cuMemsetD2D8_v2(CUdeviceptr dstDevice, size_t dstPitch, unsigned char uc, size_t Width, size_t Height) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5352,7 +5490,7 @@ CUresult CUDAAPI cuMemcpy2DAsync(const CUDA_MEMCPY2D *pCopy, CUstream hStream) printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } -CUresult CUDAAPI cuMemcpy3DAsync(const CUDA_MEMCPY3D *pCopy, CUstream hStream) + CUresult CUDAAPI cuMemsetD2D16_v2(CUdeviceptr dstDevice, size_t dstPitch, unsigned short us, size_t Width, size_t Height) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5360,7 +5498,7 @@ CUresult CUDAAPI cuMemcpy3DAsync(const CUDA_MEMCPY3D *pCopy, CUstream hStream) printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } -CUresult CUDAAPI cuMemsetD8(CUdeviceptr dstDevice, unsigned char uc, unsigned int N) + CUresult CUDAAPI cuMemsetD2D32_v2(CUdeviceptr dstDevice, size_t dstPitch, unsigned int ui, size_t Width, size_t Height) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5368,7 +5506,7 @@ CUresult CUDAAPI cuMemsetD8(CUdeviceptr dstDevice, unsigned char uc, unsigned in printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } -CUresult CUDAAPI cuMemsetD16(CUdeviceptr dstDevice, unsigned short us, unsigned int N) + CUresult CUDAAPI cuMemcpy(CUdeviceptr dst, CUdeviceptr src, size_t ByteCount) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5376,7 +5514,7 @@ CUresult CUDAAPI cuMemsetD16(CUdeviceptr dstDevice, unsigned short us, unsigned printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } -CUresult CUDAAPI cuMemsetD32(CUdeviceptr dstDevice, unsigned int ui, unsigned int N) + CUresult CUDAAPI cuMemcpyAsync(CUdeviceptr dst, CUdeviceptr src, size_t ByteCount, CUstream hStream) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5384,7 +5522,7 @@ CUresult CUDAAPI cuMemsetD32(CUdeviceptr dstDevice, unsigned int ui, unsigned in printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } -CUresult CUDAAPI cuMemsetD2D8(CUdeviceptr dstDevice, unsigned int dstPitch, unsigned char uc, unsigned int Width, unsigned int Height) + CUresult CUDAAPI cuMemcpyPeer(CUdeviceptr dstDevice, CUcontext dstContext, CUdeviceptr srcDevice, CUcontext srcContext, size_t ByteCount) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5392,7 +5530,7 @@ CUresult CUDAAPI cuMemsetD2D8(CUdeviceptr dstDevice, unsigned int dstPitch, unsi printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } -CUresult CUDAAPI cuMemsetD2D16(CUdeviceptr dstDevice, unsigned int dstPitch, unsigned short us, unsigned int Width, unsigned int Height) + CUresult CUDAAPI cuMemcpyPeerAsync(CUdeviceptr dstDevice, CUcontext dstContext, CUdeviceptr srcDevice, CUcontext srcContext, size_t ByteCount, CUstream hStream) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5400,7 +5538,7 @@ CUresult CUDAAPI cuMemsetD2D16(CUdeviceptr dstDevice, unsigned int dstPitch, uns printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } -CUresult CUDAAPI cuMemsetD2D32(CUdeviceptr dstDevice, unsigned int dstPitch, unsigned int ui, unsigned int Width, unsigned int Height) + CUresult CUDAAPI cuMemcpy3DPeer(const CUDA_MEMCPY3D_PEER *pCopy) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5408,7 +5546,7 @@ CUresult CUDAAPI cuMemsetD2D32(CUdeviceptr dstDevice, unsigned int dstPitch, uns printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } -CUresult CUDAAPI cuArrayCreate(CUarray *pHandle, const CUDA_ARRAY_DESCRIPTOR *pAllocateArray) + CUresult CUDAAPI cuMemcpy3DPeerAsync(const CUDA_MEMCPY3D_PEER *pCopy, CUstream hStream) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5416,7 +5554,8 @@ CUresult CUDAAPI cuArrayCreate(CUarray *pHandle, const CUDA_ARRAY_DESCRIPTOR *pA printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } -CUresult CUDAAPI cuArrayGetDescriptor(CUDA_ARRAY_DESCRIPTOR *pArrayDescriptor, CUarray hArray) + + CUresult CUDAAPI cuMemsetD8Async(CUdeviceptr dstDevice, unsigned char uc, size_t N, CUstream hStream) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5424,7 +5563,7 @@ CUresult CUDAAPI cuArrayGetDescriptor(CUDA_ARRAY_DESCRIPTOR *pArrayDescriptor, C printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } -CUresult CUDAAPI cuArray3DCreate(CUarray *pHandle, const CUDA_ARRAY3D_DESCRIPTOR *pAllocateArray) + CUresult CUDAAPI cuMemsetD16Async(CUdeviceptr dstDevice, unsigned short us, size_t N, CUstream hStream) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5432,7 +5571,7 @@ CUresult CUDAAPI cuArray3DCreate(CUarray *pHandle, const CUDA_ARRAY3D_DESCRIPTOR printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } -CUresult CUDAAPI cuArray3DGetDescriptor(CUDA_ARRAY3D_DESCRIPTOR *pArrayDescriptor, CUarray hArray) + CUresult CUDAAPI cuMemsetD32Async(CUdeviceptr dstDevice, unsigned int ui, size_t N, CUstream hStream) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5440,7 +5579,7 @@ CUresult CUDAAPI cuArray3DGetDescriptor(CUDA_ARRAY3D_DESCRIPTOR *pArrayDescripto printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } -CUresult CUDAAPI cuTexRefSetAddress(unsigned int *ByteOffset, CUtexref hTexRef, CUdeviceptr dptr, unsigned int bytes) + CUresult CUDAAPI cuMemsetD2D8Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned char uc, size_t Width, size_t Height, CUstream hStream) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5448,7 +5587,7 @@ CUresult CUDAAPI cuTexRefSetAddress(unsigned int *ByteOffset, CUtexref hTexRef, printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } -CUresult CUDAAPI cuTexRefSetAddress2D(CUtexref hTexRef, const CUDA_ARRAY_DESCRIPTOR *desc, CUdeviceptr dptr, unsigned int Pitch) + CUresult CUDAAPI cuMemsetD2D16Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned short us, size_t Width, size_t Height, CUstream hStream) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5456,7 +5595,7 @@ CUresult CUDAAPI cuTexRefSetAddress2D(CUtexref hTexRef, const CUDA_ARRAY_DESCRIP printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } -CUresult CUDAAPI cuTexRefGetAddress(CUdeviceptr *pdptr, CUtexref hTexRef) + CUresult CUDAAPI cuMemsetD2D32Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned int ui, size_t Width, size_t Height, CUstream hStream) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5464,7 +5603,8 @@ CUresult CUDAAPI cuTexRefGetAddress(CUdeviceptr *pdptr, CUtexref hTexRef) printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } -CUresult CUDAAPI cuGraphicsResourceGetMappedPointer(CUdeviceptr *pDevPtr, unsigned int *pSize, CUgraphicsResource resource) + + CUresult CUDAAPI cuStreamGetPriority(CUstream hStream, int *priority) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5472,9 +5612,7 @@ CUresult CUDAAPI cuGraphicsResourceGetMappedPointer(CUdeviceptr *pDevPtr, unsign printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } -#endif /* CUDART_VERSION_INTERNAL || CUDART_VERSION < 3020 */ -#if defined(CUDART_VERSION_INTERNAL) || CUDART_VERSION < 4000 -CUresult CUDAAPI cuCtxDestroy(CUcontext ctx) + CUresult CUDAAPI cuStreamGetFlags(CUstream hStream, unsigned int *flags) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5482,7 +5620,7 @@ CUresult CUDAAPI cuCtxDestroy(CUcontext ctx) printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } -CUresult CUDAAPI cuCtxPopCurrent(CUcontext *pctx) + CUresult CUDAAPI cuStreamWaitEvent(CUstream hStream, CUevent hEvent, unsigned int Flags) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5490,7 +5628,7 @@ CUresult CUDAAPI cuCtxPopCurrent(CUcontext *pctx) printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } -CUresult CUDAAPI cuCtxPushCurrent(CUcontext ctx) + CUresult CUDAAPI cuStreamAddCallback(CUstream hStream, CUstreamCallback callback, void *userData, unsigned int flags) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5498,7 +5636,7 @@ CUresult CUDAAPI cuCtxPushCurrent(CUcontext ctx) printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } -CUresult CUDAAPI cuStreamDestroy(CUstream hStream) + CUresult CUDAAPI cuStreamAttachMemAsync(CUstream hStream, CUdeviceptr dptr, size_t length, unsigned int flags) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5506,7 +5644,7 @@ CUresult CUDAAPI cuStreamDestroy(CUstream hStream) printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } -CUresult CUDAAPI cuEventDestroy(CUevent hEvent) + CUresult CUDAAPI cuStreamQuery(CUstream hStream) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5514,10 +5652,7 @@ CUresult CUDAAPI cuEventDestroy(CUevent hEvent) printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } -#endif /* CUDART_VERSION_INTERNAL || CUDART_VERSION < 4000 */ - -#if defined(CUDART_VERSION_INTERNAL) - CUresult CUDAAPI cuMemcpyHtoD_v2(CUdeviceptr dstDevice, const void *srcHost, size_t ByteCount) + CUresult CUDAAPI cuStreamSynchronize(CUstream hStream) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5525,7 +5660,7 @@ CUresult CUDAAPI cuEventDestroy(CUevent hEvent) printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } - CUresult CUDAAPI cuMemcpyDtoH_v2(void *dstHost, CUdeviceptr srcDevice, size_t ByteCount) + CUresult CUDAAPI cuEventRecord(CUevent hEvent, CUstream hStream) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5533,7 +5668,7 @@ CUresult CUDAAPI cuEventDestroy(CUevent hEvent) printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } - CUresult CUDAAPI cuMemcpyDtoD_v2(CUdeviceptr dstDevice, CUdeviceptr srcDevice, size_t ByteCount) + CUresult CUDAAPI cuLaunchKernel(CUfunction f, unsigned int gridDimX, unsigned int gridDimY, unsigned int gridDimZ, unsigned int blockDimX, unsigned int blockDimY, unsigned int blockDimZ, unsigned int sharedMemBytes, CUstream hStream, void **kernelParams, void **extra) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5541,7 +5676,7 @@ CUresult CUDAAPI cuEventDestroy(CUevent hEvent) printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } - CUresult CUDAAPI cuMemcpyDtoA_v2(CUarray dstArray, size_t dstOffset, CUdeviceptr srcDevice, size_t ByteCount) + CUresult CUDAAPI cuGraphicsMapResources(unsigned int count, CUgraphicsResource *resources, CUstream hStream) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5549,7 +5684,7 @@ CUresult CUDAAPI cuEventDestroy(CUevent hEvent) printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } - CUresult CUDAAPI cuMemcpyAtoD_v2(CUdeviceptr dstDevice, CUarray srcArray, size_t srcOffset, size_t ByteCount) + CUresult CUDAAPI cuGraphicsUnmapResources(unsigned int count, CUgraphicsResource *resources, CUstream hStream) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5557,7 +5692,7 @@ CUresult CUDAAPI cuEventDestroy(CUevent hEvent) printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } - CUresult CUDAAPI cuMemcpyHtoA_v2(CUarray dstArray, size_t dstOffset, const void *srcHost, size_t ByteCount) + CUresult CUDAAPI cuMemPrefetchAsync(CUdeviceptr devPtr, size_t count, CUdevice dstDevice, CUstream hStream) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5565,7 +5700,7 @@ CUresult CUDAAPI cuEventDestroy(CUevent hEvent) printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } - CUresult CUDAAPI cuMemcpyAtoH_v2(void *dstHost, CUarray srcArray, size_t srcOffset, size_t ByteCount) + CUresult CUDAAPI cuStreamWriteValue32(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5573,7 +5708,7 @@ CUresult CUDAAPI cuEventDestroy(CUevent hEvent) printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } - CUresult CUDAAPI cuMemcpyAtoA_v2(CUarray dstArray, size_t dstOffset, CUarray srcArray, size_t srcOffset, size_t ByteCount) + CUresult CUDAAPI cuStreamWaitValue32(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5581,7 +5716,7 @@ CUresult CUDAAPI cuEventDestroy(CUevent hEvent) printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } - CUresult CUDAAPI cuMemcpyHtoAAsync_v2(CUarray dstArray, size_t dstOffset, const void *srcHost, size_t ByteCount, CUstream hStream) + CUresult CUDAAPI cuStreamBatchMemOp(CUstream stream, unsigned int count, CUstreamBatchMemOpParams *paramArray, unsigned int flags) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5589,7 +5724,9 @@ CUresult CUDAAPI cuEventDestroy(CUevent hEvent) printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } - CUresult CUDAAPI cuMemcpyAtoHAsync_v2(void *dstHost, CUarray srcArray, size_t srcOffset, size_t ByteCount, CUstream hStream) +#endif + +CUresult cuProfilerInitialize ( const char* configFile, const char* outputFile, CUoutput_mode outputMode ) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5597,7 +5734,7 @@ CUresult CUDAAPI cuEventDestroy(CUevent hEvent) printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } - CUresult CUDAAPI cuMemcpy2D_v2(const CUDA_MEMCPY2D *pCopy) +CUresult cuProfilerStart ( void ) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5605,7 +5742,7 @@ CUresult CUDAAPI cuEventDestroy(CUevent hEvent) printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } - CUresult CUDAAPI cuMemcpy2DUnaligned_v2(const CUDA_MEMCPY2D *pCopy) +CUresult cuProfilerStop ( void ) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5613,7 +5750,10 @@ CUresult CUDAAPI cuEventDestroy(CUevent hEvent) printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } - CUresult CUDAAPI cuMemcpy3D_v2(const CUDA_MEMCPY3D *pCopy) + +//_ptds + +extern "C" CUresult CUDAAPI cuMemcpy_ptds(CUdeviceptr dst, CUdeviceptr src, size_t ByteCount) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5621,7 +5761,8 @@ CUresult CUDAAPI cuEventDestroy(CUevent hEvent) printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } - CUresult CUDAAPI cuMemcpyHtoDAsync_v2(CUdeviceptr dstDevice, const void *srcHost, size_t ByteCount, CUstream hStream) + +extern "C" CUresult CUDAAPI cuMemcpyPeer_ptds(CUdeviceptr dstDevice, CUcontext dstContext, CUdeviceptr srcDevice, CUcontext srcContext, size_t ByteCount) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5629,7 +5770,8 @@ CUresult CUDAAPI cuEventDestroy(CUevent hEvent) printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } - CUresult CUDAAPI cuMemcpyDtoHAsync_v2(void *dstHost, CUdeviceptr srcDevice, size_t ByteCount, CUstream hStream) + + extern "C" CUresult CUDAAPI cuMemcpyHtoD_v2_ptds(CUdeviceptr dstDevice, const void *srcHost, size_t ByteCount) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5637,7 +5779,7 @@ CUresult CUDAAPI cuEventDestroy(CUevent hEvent) printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } - CUresult CUDAAPI cuMemcpyDtoDAsync_v2(CUdeviceptr dstDevice, CUdeviceptr srcDevice, size_t ByteCount, CUstream hStream) + extern "C" CUresult CUDAAPI cuMemcpyDtoH_v2_ptds(void *dstHost, CUdeviceptr srcDevice, size_t ByteCount) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5645,7 +5787,7 @@ CUresult CUDAAPI cuEventDestroy(CUevent hEvent) printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } - CUresult CUDAAPI cuMemcpy2DAsync_v2(const CUDA_MEMCPY2D *pCopy, CUstream hStream) + extern "C" CUresult CUDAAPI cuMemcpyDtoD_v2_ptds(CUdeviceptr dstDevice, CUdeviceptr srcDevice, size_t ByteCount) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5653,7 +5795,7 @@ CUresult CUDAAPI cuEventDestroy(CUevent hEvent) printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } - CUresult CUDAAPI cuMemcpy3DAsync_v2(const CUDA_MEMCPY3D *pCopy, CUstream hStream) + extern "C" CUresult CUDAAPI cuMemcpy2DUnaligned_v2_ptds(const CUDA_MEMCPY2D *pCopy) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5661,7 +5803,7 @@ CUresult CUDAAPI cuEventDestroy(CUevent hEvent) printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } - CUresult CUDAAPI cuMemsetD8_v2(CUdeviceptr dstDevice, unsigned char uc, size_t N) + extern "C" CUresult CUDAAPI cuMemcpy3D_v2_ptds(const CUDA_MEMCPY3D *pCopy) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5669,7 +5811,7 @@ CUresult CUDAAPI cuEventDestroy(CUevent hEvent) printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } - CUresult CUDAAPI cuMemsetD16_v2(CUdeviceptr dstDevice, unsigned short us, size_t N) + extern "C" CUresult CUDAAPI cuMemcpy3DPeer_ptds(const CUDA_MEMCPY3D_PEER *pCopy) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5677,7 +5819,7 @@ CUresult CUDAAPI cuEventDestroy(CUevent hEvent) printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } - CUresult CUDAAPI cuMemsetD32_v2(CUdeviceptr dstDevice, unsigned int ui, size_t N) +extern "C" CUresult CUDAAPI cuMemsetD8_v2_ptds(CUdeviceptr dstDevice, unsigned char uc, unsigned int N) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5685,7 +5827,7 @@ CUresult CUDAAPI cuEventDestroy(CUevent hEvent) printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } - CUresult CUDAAPI cuMemsetD2D8_v2(CUdeviceptr dstDevice, size_t dstPitch, unsigned char uc, size_t Width, size_t Height) +extern "C" CUresult CUDAAPI cuMemsetD16_v2_ptds(CUdeviceptr dstDevice, unsigned short us, unsigned int N) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5693,7 +5835,7 @@ CUresult CUDAAPI cuEventDestroy(CUevent hEvent) printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } - CUresult CUDAAPI cuMemsetD2D16_v2(CUdeviceptr dstDevice, size_t dstPitch, unsigned short us, size_t Width, size_t Height) +extern "C" CUresult CUDAAPI cuMemsetD32_v2_ptds(CUdeviceptr dstDevice, unsigned int ui, unsigned int N) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5701,7 +5843,7 @@ CUresult CUDAAPI cuEventDestroy(CUevent hEvent) printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } - CUresult CUDAAPI cuMemsetD2D32_v2(CUdeviceptr dstDevice, size_t dstPitch, unsigned int ui, size_t Width, size_t Height) +extern "C" CUresult CUDAAPI cuMemsetD2D8_v2_ptds(CUdeviceptr dstDevice, unsigned int dstPitch, unsigned char uc, unsigned int Width, unsigned int Height) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5709,7 +5851,7 @@ CUresult CUDAAPI cuEventDestroy(CUevent hEvent) printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } - CUresult CUDAAPI cuMemcpy(CUdeviceptr dst, CUdeviceptr src, size_t ByteCount) +extern "C" CUresult CUDAAPI cuMemsetD2D16_v2_ptds(CUdeviceptr dstDevice, unsigned int dstPitch, unsigned short us, unsigned int Width, unsigned int Height) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5717,7 +5859,7 @@ CUresult CUDAAPI cuEventDestroy(CUevent hEvent) printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } - CUresult CUDAAPI cuMemcpyAsync(CUdeviceptr dst, CUdeviceptr src, size_t ByteCount, CUstream hStream) +extern "C" CUresult CUDAAPI cuMemsetD2D32_v2_ptds(CUdeviceptr dstDevice, unsigned int dstPitch, unsigned int ui, unsigned int Width, unsigned int Height) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5725,7 +5867,9 @@ CUresult CUDAAPI cuEventDestroy(CUevent hEvent) printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } - CUresult CUDAAPI cuMemcpyPeer(CUdeviceptr dstDevice, CUcontext dstContext, CUdeviceptr srcDevice, CUcontext srcContext, size_t ByteCount) + +//_ptsz +extern "C" CUresult CUDAAPI cuMemcpy3DPeer_ptsz(const CUDA_MEMCPY3D_PEER *pCopy) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5733,7 +5877,8 @@ CUresult CUDAAPI cuEventDestroy(CUevent hEvent) printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } - CUresult CUDAAPI cuMemcpyPeerAsync(CUdeviceptr dstDevice, CUcontext dstContext, CUdeviceptr srcDevice, CUcontext srcContext, size_t ByteCount, CUstream hStream) + +extern "C" CUresult CUDAAPI cuMemcpyAsync_ptsz(CUdeviceptr dst, CUdeviceptr src, size_t ByteCount, CUstream hStream) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5741,7 +5886,8 @@ CUresult CUDAAPI cuEventDestroy(CUevent hEvent) printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } - CUresult CUDAAPI cuMemcpy3DPeer(const CUDA_MEMCPY3D_PEER *pCopy) + +extern "C" CUresult CUDAAPI cuMemcpyPeerAsync_ptsz(CUdeviceptr dstDevice, CUcontext dstContext, CUdeviceptr srcDevice, CUcontext srcContext, size_t ByteCount, CUstream hStream) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5749,7 +5895,7 @@ CUresult CUDAAPI cuEventDestroy(CUevent hEvent) printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } - CUresult CUDAAPI cuMemcpy3DPeerAsync(const CUDA_MEMCPY3D_PEER *pCopy, CUstream hStream) + extern "C" CUresult CUDAAPI cuMemcpyHtoAAsync_v2_ptsz(CUarray dstArray, size_t dstOffset, const void *srcHost, size_t ByteCount, CUstream hStream) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5757,8 +5903,7 @@ CUresult CUDAAPI cuEventDestroy(CUevent hEvent) printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } - - CUresult CUDAAPI cuMemsetD8Async(CUdeviceptr dstDevice, unsigned char uc, size_t N, CUstream hStream) + extern "C" CUresult CUDAAPI cuMemcpyAtoHAsync_v2_ptsz(void *dstHost, CUarray srcArray, size_t srcOffset, size_t ByteCount, CUstream hStream) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5766,7 +5911,7 @@ CUresult CUDAAPI cuEventDestroy(CUevent hEvent) printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } - CUresult CUDAAPI cuMemsetD16Async(CUdeviceptr dstDevice, unsigned short us, size_t N, CUstream hStream) + extern "C" CUresult CUDAAPI cuMemcpyHtoDAsync_v2_ptsz(CUdeviceptr dstDevice, const void *srcHost, size_t ByteCount, CUstream hStream) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5774,7 +5919,7 @@ CUresult CUDAAPI cuEventDestroy(CUevent hEvent) printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } - CUresult CUDAAPI cuMemsetD32Async(CUdeviceptr dstDevice, unsigned int ui, size_t N, CUstream hStream) + extern "C" CUresult CUDAAPI cuMemcpyDtoHAsync_v2_ptsz(void *dstHost, CUdeviceptr srcDevice, size_t ByteCount, CUstream hStream) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5782,7 +5927,7 @@ CUresult CUDAAPI cuEventDestroy(CUevent hEvent) printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } - CUresult CUDAAPI cuMemsetD2D8Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned char uc, size_t Width, size_t Height, CUstream hStream) + extern "C" CUresult CUDAAPI cuMemcpyDtoDAsync_v2_ptsz(CUdeviceptr dstDevice, CUdeviceptr srcDevice, size_t ByteCount, CUstream hStream) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5790,7 +5935,7 @@ CUresult CUDAAPI cuEventDestroy(CUevent hEvent) printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } - CUresult CUDAAPI cuMemsetD2D16Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned short us, size_t Width, size_t Height, CUstream hStream) + extern "C" CUresult CUDAAPI cuMemcpy2DAsync_v2_ptsz(const CUDA_MEMCPY2D *pCopy, CUstream hStream) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5798,7 +5943,15 @@ CUresult CUDAAPI cuEventDestroy(CUevent hEvent) printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } - CUresult CUDAAPI cuMemsetD2D32Async(CUdeviceptr dstDevice, size_t dstPitch, unsigned int ui, size_t Width, size_t Height, CUstream hStream) + extern "C" CUresult CUDAAPI cuMemcpy3DAsync_v2_ptsz(const CUDA_MEMCPY3D *pCopy, CUstream hStream) +{ + if(g_debug_execution >= 3){ + announce_call(__my_func__); + } + printf("WARNING: this function has not been implemented yet."); + return CUDA_SUCCESS; +} + extern "C" CUresult CUDAAPI cuMemcpy3DPeerAsync_ptsz(const CUDA_MEMCPY3D_PEER *pCopy, CUstream hStream) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5807,7 +5960,7 @@ CUresult CUDAAPI cuEventDestroy(CUevent hEvent) return CUDA_SUCCESS; } - CUresult CUDAAPI cuStreamGetPriority(CUstream hStream, int *priority) + extern "C" CUresult CUDAAPI cuMemsetD8Async_ptsz(CUdeviceptr dstDevice, unsigned char uc, size_t N, CUstream hStream) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5815,7 +5968,7 @@ CUresult CUDAAPI cuEventDestroy(CUevent hEvent) printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } - CUresult CUDAAPI cuStreamGetFlags(CUstream hStream, unsigned int *flags) + extern "C" CUresult CUDAAPI cuMemsetD2D8Async_ptsz(CUdeviceptr dstDevice, size_t dstPitch, unsigned char uc, size_t Width, size_t Height, CUstream hStream) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5823,7 +5976,7 @@ CUresult CUDAAPI cuEventDestroy(CUevent hEvent) printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } - CUresult CUDAAPI cuStreamWaitEvent(CUstream hStream, CUevent hEvent, unsigned int Flags) + extern "C" CUresult CUDAAPI cuLaunchKernel_ptsz(CUfunction f, unsigned int gridDimX, unsigned int gridDimY, unsigned int gridDimZ, unsigned int blockDimX, unsigned int blockDimY, unsigned int blockDimZ, unsigned int sharedMemBytes, CUstream hStream, void **kernelParams, void **extra) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5831,7 +5984,7 @@ CUresult CUDAAPI cuEventDestroy(CUevent hEvent) printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } - CUresult CUDAAPI cuStreamAddCallback(CUstream hStream, CUstreamCallback callback, void *userData, unsigned int flags) + extern "C" CUresult CUDAAPI cuEventRecord_ptsz(CUevent hEvent, CUstream hStream) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5839,7 +5992,7 @@ CUresult CUDAAPI cuEventDestroy(CUevent hEvent) printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } - CUresult CUDAAPI cuStreamAttachMemAsync(CUstream hStream, CUdeviceptr dptr, size_t length, unsigned int flags) + extern "C" CUresult CUDAAPI cuStreamWriteValue32_ptsz(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5847,7 +6000,7 @@ CUresult CUDAAPI cuEventDestroy(CUevent hEvent) printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } - CUresult CUDAAPI cuStreamQuery(CUstream hStream) + extern "C" CUresult CUDAAPI cuStreamWaitValue32_ptsz(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5855,7 +6008,7 @@ CUresult CUDAAPI cuEventDestroy(CUevent hEvent) printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } - CUresult CUDAAPI cuStreamSynchronize(CUstream hStream) + extern "C" CUresult CUDAAPI cuStreamBatchMemOp_ptsz(CUstream stream, unsigned int count, CUstreamBatchMemOpParams *paramArray, unsigned int flags) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5863,7 +6016,7 @@ CUresult CUDAAPI cuEventDestroy(CUevent hEvent) printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } - CUresult CUDAAPI cuEventRecord(CUevent hEvent, CUstream hStream) +extern "C" CUresult CUDAAPI cuStreamGetPriority_ptsz(CUstream hStream, int *priority) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5871,7 +6024,7 @@ CUresult CUDAAPI cuEventDestroy(CUevent hEvent) printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } - CUresult CUDAAPI cuLaunchKernel(CUfunction f, unsigned int gridDimX, unsigned int gridDimY, unsigned int gridDimZ, unsigned int blockDimX, unsigned int blockDimY, unsigned int blockDimZ, unsigned int sharedMemBytes, CUstream hStream, void **kernelParams, void **extra) +extern "C" CUresult CUDAAPI cuStreamGetFlags_ptsz(CUstream hStream, unsigned int *flags) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5879,7 +6032,9 @@ CUresult CUDAAPI cuEventDestroy(CUevent hEvent) printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } - CUresult CUDAAPI cuGraphicsMapResources(unsigned int count, CUgraphicsResource *resources, CUstream hStream) + + +extern "C" CUresult CUDAAPI cuStreamWaitEvent_ptsz(CUstream hStream, CUevent hEvent, unsigned int Flags) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5887,7 +6042,8 @@ CUresult CUDAAPI cuEventDestroy(CUevent hEvent) printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } - CUresult CUDAAPI cuGraphicsUnmapResources(unsigned int count, CUgraphicsResource *resources, CUstream hStream) + +extern "C" CUresult CUDAAPI cuStreamAddCallback_ptsz(CUstream hStream, CUstreamCallback callback, void *userData, unsigned int flags) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5895,7 +6051,8 @@ CUresult CUDAAPI cuEventDestroy(CUevent hEvent) printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } - CUresult CUDAAPI cuMemPrefetchAsync(CUdeviceptr devPtr, size_t count, CUdevice dstDevice, CUstream hStream) + +extern "C" CUresult CUDAAPI cuStreamSynchronize_ptsz(CUstream hStream) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5903,7 +6060,8 @@ CUresult CUDAAPI cuEventDestroy(CUevent hEvent) printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } - CUresult CUDAAPI cuStreamWriteValue32(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) + + extern "C" CUresult CUDAAPI cuStreamQuery_ptsz(CUstream hStream) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5911,7 +6069,7 @@ CUresult CUDAAPI cuEventDestroy(CUevent hEvent) printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } - CUresult CUDAAPI cuStreamWaitValue32(CUstream stream, CUdeviceptr addr, cuuint32_t value, unsigned int flags) +extern "C" CUresult CUDAAPI cuStreamAttachMemAsync_ptsz(CUstream hStream, CUdeviceptr dptr, size_t length, unsigned int flags) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5919,7 +6077,27 @@ CUresult CUDAAPI cuEventDestroy(CUevent hEvent) printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } - CUresult CUDAAPI cuStreamBatchMemOp(CUstream stream, unsigned int count, CUstreamBatchMemOpParams *paramArray, unsigned int flags) + +extern "C" CUresult CUDAAPI cuGraphicsMapResources_ptsz(unsigned int count, CUgraphicsResource *resources, CUstream hStream) +{ + if(g_debug_execution >= 3){ + announce_call(__my_func__); + } + printf("WARNING: this function has not been implemented yet."); + return CUDA_SUCCESS; +} + + +extern "C" CUresult CUDAAPI cuGraphicsUnmapResources_ptsz(unsigned int count, CUgraphicsResource *resources, CUstream hStream) +{ + if(g_debug_execution >= 3){ + announce_call(__my_func__); + } + printf("WARNING: this function has not been implemented yet."); + return CUDA_SUCCESS; +} + + extern "C" CUresult CUDAAPI cuMemPrefetchAsync_ptsz(CUdeviceptr devPtr, size_t count, CUdevice dstDevice, CUstream hStream) { if(g_debug_execution >= 3){ announce_call(__my_func__); @@ -5927,4 +6105,3 @@ CUresult CUDAAPI cuEventDestroy(CUevent hEvent) printf("WARNING: this function has not been implemented yet."); return CUDA_SUCCESS; } -#endif |
