Skip to content

Commit 2be0aac

Browse files
committed
Rebase to CTK 12.4
1 parent 4c657b6 commit 2be0aac

File tree

114 files changed

+9399
-4547
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

114 files changed

+9399
-4547
lines changed

MANIFEST.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
include versioneer.py
21
include cuda/_version.py

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ There're differences in each of these options that are described further in [Ins
1717
CUDA Python is supported on all platforms that CUDA is supported. Specific dependencies are as follows:
1818

1919
* Driver: Linux (450.80.02 or later) Windows (456.38 or later)
20-
* CUDA Toolkit 12.0 to 12.3
20+
* CUDA Toolkit 12.0 to 12.4
2121

2222
Only the NVRTC redistributable component is required from the CUDA Toolkit. [CUDA Toolkit Documentation](https://docs.nvidia.com/cuda/index.html) Installation Guides can be used for guidance. Note that the NVRTC component in the Toolkit can be obtained via PYPI, Conda or Local Installer.
2323

@@ -29,7 +29,7 @@ Before dropping support, an issue will be raised to look for feedback.
2929

3030
Source builds work for multiple Python versions, however pre-build PyPI and Conda packages are only provided for a subset:
3131

32-
* Python 3.9 to 3.11
32+
* Python 3.9 to 3.12
3333

3434
## Testing
3535

cuda/_cuda/ccuda.pxd.in

Lines changed: 121 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2021-2023 NVIDIA Corporation. All rights reserved.
1+
# Copyright 2021-2024 NVIDIA Corporation. All rights reserved.
22
#
33
# Please refer to the NVIDIA end user license agreement (EULA) associated
44
# with this source code for terms and conditions that govern your use of
@@ -217,16 +217,6 @@ cdef CUresult _cuCtxGetCacheConfig(CUfunc_cache* pconfig) except ?CUDA_ERROR_NOT
217217
cdef CUresult _cuCtxSetCacheConfig(CUfunc_cache config) except ?CUDA_ERROR_NOT_FOUND nogil
218218
{{endif}}
219219

220-
{{if 'cuCtxGetSharedMemConfig' in found_functions}}
221-
222-
cdef CUresult _cuCtxGetSharedMemConfig(CUsharedconfig* pConfig) except ?CUDA_ERROR_NOT_FOUND nogil
223-
{{endif}}
224-
225-
{{if 'cuCtxSetSharedMemConfig' in found_functions}}
226-
227-
cdef CUresult _cuCtxSetSharedMemConfig(CUsharedconfig config) except ?CUDA_ERROR_NOT_FOUND nogil
228-
{{endif}}
229-
230220
{{if 'cuCtxGetApiVersion' in found_functions}}
231221

232222
cdef CUresult _cuCtxGetApiVersion(CUcontext ctx, unsigned int* version) except ?CUDA_ERROR_NOT_FOUND nogil
@@ -257,6 +247,16 @@ cdef CUresult _cuCtxAttach(CUcontext* pctx, unsigned int flags) except ?CUDA_ERR
257247
cdef CUresult _cuCtxDetach(CUcontext ctx) except ?CUDA_ERROR_NOT_FOUND nogil
258248
{{endif}}
259249

250+
{{if 'cuCtxGetSharedMemConfig' in found_functions}}
251+
252+
cdef CUresult _cuCtxGetSharedMemConfig(CUsharedconfig* pConfig) except ?CUDA_ERROR_NOT_FOUND nogil
253+
{{endif}}
254+
255+
{{if 'cuCtxSetSharedMemConfig' in found_functions}}
256+
257+
cdef CUresult _cuCtxSetSharedMemConfig(CUsharedconfig config) except ?CUDA_ERROR_NOT_FOUND nogil
258+
{{endif}}
259+
260260
{{if 'cuModuleLoad' in found_functions}}
261261

262262
cdef CUresult _cuModuleLoad(CUmodule* module, const char* fname) except ?CUDA_ERROR_NOT_FOUND nogil
@@ -292,6 +292,16 @@ cdef CUresult _cuModuleGetLoadingMode(CUmoduleLoadingMode* mode) except ?CUDA_ER
292292
cdef CUresult _cuModuleGetFunction(CUfunction* hfunc, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil
293293
{{endif}}
294294

295+
{{if 'cuModuleGetFunctionCount' in found_functions}}
296+
297+
cdef CUresult _cuModuleGetFunctionCount(unsigned int* count, CUmodule mod) except ?CUDA_ERROR_NOT_FOUND nogil
298+
{{endif}}
299+
300+
{{if 'cuModuleEnumerateFunctions' in found_functions}}
301+
302+
cdef CUresult _cuModuleEnumerateFunctions(CUfunction* functions, unsigned int numFunctions, CUmodule mod) except ?CUDA_ERROR_NOT_FOUND nogil
303+
{{endif}}
304+
295305
{{if 'cuModuleGetGlobal_v2' in found_functions}}
296306

297307
cdef CUresult _cuModuleGetGlobal_v2(CUdeviceptr* dptr, size_t* numbytes, CUmodule hmod, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil
@@ -352,6 +362,16 @@ cdef CUresult _cuLibraryUnload(CUlibrary library) except ?CUDA_ERROR_NOT_FOUND n
352362
cdef CUresult _cuLibraryGetKernel(CUkernel* pKernel, CUlibrary library, const char* name) except ?CUDA_ERROR_NOT_FOUND nogil
353363
{{endif}}
354364

365+
{{if 'cuLibraryGetKernelCount' in found_functions}}
366+
367+
cdef CUresult _cuLibraryGetKernelCount(unsigned int* count, CUlibrary lib) except ?CUDA_ERROR_NOT_FOUND nogil
368+
{{endif}}
369+
370+
{{if 'cuLibraryEnumerateKernels' in found_functions}}
371+
372+
cdef CUresult _cuLibraryEnumerateKernels(CUkernel* kernels, unsigned int numKernels, CUlibrary lib) except ?CUDA_ERROR_NOT_FOUND nogil
373+
{{endif}}
374+
355375
{{if 'cuLibraryGetModule' in found_functions}}
356376

357377
cdef CUresult _cuLibraryGetModule(CUmodule* pMod, CUlibrary library) except ?CUDA_ERROR_NOT_FOUND nogil
@@ -397,6 +417,11 @@ cdef CUresult _cuKernelSetCacheConfig(CUkernel kernel, CUfunc_cache config, CUde
397417
cdef CUresult _cuKernelGetName(const char** name, CUkernel hfunc) except ?CUDA_ERROR_NOT_FOUND nogil
398418
{{endif}}
399419

420+
{{if 'cuKernelGetParamInfo' in found_functions}}
421+
422+
cdef CUresult _cuKernelGetParamInfo(CUkernel kernel, size_t paramIndex, size_t* paramOffset, size_t* paramSize) except ?CUDA_ERROR_NOT_FOUND nogil
423+
{{endif}}
424+
400425
{{if 'cuMemGetInfo_v2' in found_functions}}
401426

402427
cdef CUresult _cuMemGetInfo_v2(size_t* free, size_t* total) except ?CUDA_ERROR_NOT_FOUND nogil
@@ -452,6 +477,16 @@ cdef CUresult _cuMemHostGetFlags(unsigned int* pFlags, void* p) except ?CUDA_ERR
452477
cdef CUresult _cuMemAllocManaged(CUdeviceptr* dptr, size_t bytesize, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil
453478
{{endif}}
454479

480+
{{if 'cuDeviceRegisterAsyncNotification' in found_functions}}
481+
482+
cdef CUresult _cuDeviceRegisterAsyncNotification(CUdevice device, CUasyncCallback callbackFunc, void* userData, CUasyncCallbackHandle* callback) except ?CUDA_ERROR_NOT_FOUND nogil
483+
{{endif}}
484+
485+
{{if 'cuDeviceUnregisterAsyncNotification' in found_functions}}
486+
487+
cdef CUresult _cuDeviceUnregisterAsyncNotification(CUdevice device, CUasyncCallbackHandle callback) except ?CUDA_ERROR_NOT_FOUND nogil
488+
{{endif}}
489+
455490
{{if 'cuDeviceGetByPCIBusId' in found_functions}}
456491

457492
cdef CUresult _cuDeviceGetByPCIBusId(CUdevice* dev, const char* pciBusId) except ?CUDA_ERROR_NOT_FOUND nogil
@@ -1197,11 +1232,6 @@ cdef CUresult _cuFuncSetAttribute(CUfunction hfunc, CUfunction_attribute attrib,
11971232
cdef CUresult _cuFuncSetCacheConfig(CUfunction hfunc, CUfunc_cache config) except ?CUDA_ERROR_NOT_FOUND nogil
11981233
{{endif}}
11991234

1200-
{{if 'cuFuncSetSharedMemConfig' in found_functions}}
1201-
1202-
cdef CUresult _cuFuncSetSharedMemConfig(CUfunction hfunc, CUsharedconfig config) except ?CUDA_ERROR_NOT_FOUND nogil
1203-
{{endif}}
1204-
12051235
{{if 'cuFuncGetModule' in found_functions}}
12061236

12071237
cdef CUresult _cuFuncGetModule(CUmodule* hmod, CUfunction hfunc) except ?CUDA_ERROR_NOT_FOUND nogil
@@ -1212,6 +1242,21 @@ cdef CUresult _cuFuncGetModule(CUmodule* hmod, CUfunction hfunc) except ?CUDA_ER
12121242
cdef CUresult _cuFuncGetName(const char** name, CUfunction hfunc) except ?CUDA_ERROR_NOT_FOUND nogil
12131243
{{endif}}
12141244

1245+
{{if 'cuFuncGetParamInfo' in found_functions}}
1246+
1247+
cdef CUresult _cuFuncGetParamInfo(CUfunction func, size_t paramIndex, size_t* paramOffset, size_t* paramSize) except ?CUDA_ERROR_NOT_FOUND nogil
1248+
{{endif}}
1249+
1250+
{{if 'cuFuncIsLoaded' in found_functions}}
1251+
1252+
cdef CUresult _cuFuncIsLoaded(CUfunctionLoadingState* state, CUfunction function) except ?CUDA_ERROR_NOT_FOUND nogil
1253+
{{endif}}
1254+
1255+
{{if 'cuFuncLoad' in found_functions}}
1256+
1257+
cdef CUresult _cuFuncLoad(CUfunction function) except ?CUDA_ERROR_NOT_FOUND nogil
1258+
{{endif}}
1259+
12151260
{{if 'cuLaunchKernel' in found_functions}}
12161261

12171262
cdef CUresult _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) except ?CUDA_ERROR_NOT_FOUND nogil
@@ -1287,6 +1332,11 @@ cdef CUresult _cuLaunchGridAsync(CUfunction f, int grid_width, int grid_height,
12871332
cdef CUresult _cuParamSetTexRef(CUfunction hfunc, int texunit, CUtexref hTexRef) except ?CUDA_ERROR_NOT_FOUND nogil
12881333
{{endif}}
12891334

1335+
{{if 'cuFuncSetSharedMemConfig' in found_functions}}
1336+
1337+
cdef CUresult _cuFuncSetSharedMemConfig(CUfunction hfunc, CUsharedconfig config) except ?CUDA_ERROR_NOT_FOUND nogil
1338+
{{endif}}
1339+
12901340
{{if 'cuGraphCreate' in found_functions}}
12911341

12921342
cdef CUresult _cuGraphCreate(CUgraph* phGraph, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil
@@ -2047,6 +2097,61 @@ cdef CUresult _cuCoredumpSetAttributeGlobal(CUcoredumpSettings attrib, void* val
20472097
cdef CUresult _cuGetExportTable(const void** ppExportTable, const CUuuid* pExportTableId) except ?CUDA_ERROR_NOT_FOUND nogil
20482098
{{endif}}
20492099

2100+
{{if 'cuGreenCtxCreate' in found_functions}}
2101+
2102+
cdef CUresult _cuGreenCtxCreate(CUgreenCtx* phCtx, CUdevResourceDesc desc, CUdevice dev, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil
2103+
{{endif}}
2104+
2105+
{{if 'cuGreenCtxDestroy' in found_functions}}
2106+
2107+
cdef CUresult _cuGreenCtxDestroy(CUgreenCtx hCtx) except ?CUDA_ERROR_NOT_FOUND nogil
2108+
{{endif}}
2109+
2110+
{{if 'cuCtxFromGreenCtx' in found_functions}}
2111+
2112+
cdef CUresult _cuCtxFromGreenCtx(CUcontext* pContext, CUgreenCtx hCtx) except ?CUDA_ERROR_NOT_FOUND nogil
2113+
{{endif}}
2114+
2115+
{{if 'cuDeviceGetDevResource' in found_functions}}
2116+
2117+
cdef CUresult _cuDeviceGetDevResource(CUdevice device, CUdevResource* resource, CUdevResourceType typename) except ?CUDA_ERROR_NOT_FOUND nogil
2118+
{{endif}}
2119+
2120+
{{if 'cuCtxGetDevResource' in found_functions}}
2121+
2122+
cdef CUresult _cuCtxGetDevResource(CUcontext hCtx, CUdevResource* resource, CUdevResourceType typename) except ?CUDA_ERROR_NOT_FOUND nogil
2123+
{{endif}}
2124+
2125+
{{if 'cuGreenCtxGetDevResource' in found_functions}}
2126+
2127+
cdef CUresult _cuGreenCtxGetDevResource(CUgreenCtx hCtx, CUdevResource* resource, CUdevResourceType typename) except ?CUDA_ERROR_NOT_FOUND nogil
2128+
{{endif}}
2129+
2130+
{{if 'cuDevSmResourceSplitByCount' in found_functions}}
2131+
2132+
cdef CUresult _cuDevSmResourceSplitByCount(CUdevResource* result, unsigned int* nbGroups, const CUdevResource* input, CUdevResource* remaining, unsigned int useFlags, unsigned int minCount) except ?CUDA_ERROR_NOT_FOUND nogil
2133+
{{endif}}
2134+
2135+
{{if 'cuDevResourceGenerateDesc' in found_functions}}
2136+
2137+
cdef CUresult _cuDevResourceGenerateDesc(CUdevResourceDesc* phDesc, CUdevResource* resources, unsigned int nbResources) except ?CUDA_ERROR_NOT_FOUND nogil
2138+
{{endif}}
2139+
2140+
{{if 'cuGreenCtxRecordEvent' in found_functions}}
2141+
2142+
cdef CUresult _cuGreenCtxRecordEvent(CUgreenCtx hCtx, CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil
2143+
{{endif}}
2144+
2145+
{{if 'cuGreenCtxWaitEvent' in found_functions}}
2146+
2147+
cdef CUresult _cuGreenCtxWaitEvent(CUgreenCtx hCtx, CUevent hEvent) except ?CUDA_ERROR_NOT_FOUND nogil
2148+
{{endif}}
2149+
2150+
{{if 'cuStreamGetGreenCtx' in found_functions}}
2151+
2152+
cdef CUresult _cuStreamGetGreenCtx(CUstream hStream, CUgreenCtx* phCtx) except ?CUDA_ERROR_NOT_FOUND nogil
2153+
{{endif}}
2154+
20502155
{{if 'cuProfilerStart' in found_functions}}
20512156

20522157
cdef CUresult _cuProfilerStart() except ?CUDA_ERROR_NOT_FOUND nogil

0 commit comments

Comments
 (0)