Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 06fb29f

Browse files
committed
also fix for cudart
1 parent ec3a77e commit 06fb29f

File tree

8 files changed

+48
-40
lines changed

8 files changed

+48
-40
lines changed

cuda_bindings/cuda/bindings/_bindings/cyruntime.pxd.in

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -881,7 +881,7 @@ cdef cyruntime.cudaError_t _cudaGetChannelDesc(cyruntime.cudaChannelFormatDesc*
881881

882882
{{if 'cudaCreateChannelDesc' in found_functions}}
883883

884-
cdef cyruntime.cudaChannelFormatDesc _cudaCreateChannelDesc(int x, int y, int z, int w, cyruntime.cudaChannelFormatKind f) nogil
884+
cdef cyruntime.cudaChannelFormatDesc _cudaCreateChannelDesc(int x, int y, int z, int w, cyruntime.cudaChannelFormatKind f) except* nogil
885885
{{endif}}
886886

887887
{{if 'cudaCreateTextureObject' in found_functions}}
@@ -1446,17 +1446,17 @@ cdef cyruntime.cudaError_t _cudaGetKernel(cyruntime.cudaKernel_t* kernelPtr, con
14461446

14471447
{{if 'make_cudaPitchedPtr' in found_functions}}
14481448

1449-
cdef cyruntime.cudaPitchedPtr _make_cudaPitchedPtr(void* d, size_t p, size_t xsz, size_t ysz) nogil
1449+
cdef cyruntime.cudaPitchedPtr _make_cudaPitchedPtr(void* d, size_t p, size_t xsz, size_t ysz) except* nogil
14501450
{{endif}}
14511451

14521452
{{if 'make_cudaPos' in found_functions}}
14531453

1454-
cdef cyruntime.cudaPos _make_cudaPos(size_t x, size_t y, size_t z) nogil
1454+
cdef cyruntime.cudaPos _make_cudaPos(size_t x, size_t y, size_t z) except* nogil
14551455
{{endif}}
14561456

14571457
{{if 'make_cudaExtent' in found_functions}}
14581458

1459-
cdef cyruntime.cudaExtent _make_cudaExtent(size_t w, size_t h, size_t d) nogil
1459+
cdef cyruntime.cudaExtent _make_cudaExtent(size_t w, size_t h, size_t d) except* nogil
14601460
{{endif}}
14611461

14621462
{{if 'cudaProfilerStart' in found_functions}}

cuda_bindings/cuda/bindings/_bindings/cyruntime.pxi.in

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
# is strictly prohibited.
88
#
99
# This code was automatically generated with version 12.8.0. Do not modify it directly.
10+
cimport cython
1011
cimport cuda.bindings.cyruntime as cyruntime
1112

1213
cdef extern from "cuda_runtime_api.h":
@@ -898,7 +899,7 @@ cdef extern from "cuda_runtime_api.h":
898899
{{endif}}
899900
{{if 'cudaCreateChannelDesc' in found_functions}}
900901

901-
cyruntime.cudaChannelFormatDesc cudaCreateChannelDesc(int x, int y, int z, int w, cyruntime.cudaChannelFormatKind f) nogil
902+
cyruntime.cudaChannelFormatDesc cudaCreateChannelDesc(int x, int y, int z, int w, cyruntime.cudaChannelFormatKind f) except* nogil
902903

903904
{{endif}}
904905
{{if 'cudaCreateTextureObject' in found_functions}}
@@ -1466,17 +1467,17 @@ cdef extern from "cuda_runtime.h":
14661467

14671468
{{if 'make_cudaPitchedPtr' in found_functions}}
14681469

1469-
cyruntime.cudaPitchedPtr make_cudaPitchedPtr(void* d, size_t p, size_t xsz, size_t ysz) nogil
1470+
cyruntime.cudaPitchedPtr make_cudaPitchedPtr(void* d, size_t p, size_t xsz, size_t ysz) except* nogil
14701471

14711472
{{endif}}
14721473
{{if 'make_cudaPos' in found_functions}}
14731474

1474-
cyruntime.cudaPos make_cudaPos(size_t x, size_t y, size_t z) nogil
1475+
cyruntime.cudaPos make_cudaPos(size_t x, size_t y, size_t z) except* nogil
14751476

14761477
{{endif}}
14771478
{{if 'make_cudaExtent' in found_functions}}
14781479

1479-
cyruntime.cudaExtent make_cudaExtent(size_t w, size_t h, size_t d) nogil
1480+
cyruntime.cudaExtent make_cudaExtent(size_t w, size_t h, size_t d) except* nogil
14801481

14811482
{{endif}}
14821483

cuda_bindings/cuda/bindings/_bindings/cyruntime.pyx.in

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1591,8 +1591,8 @@ cdef cyruntime.cudaError_t _cudaGetChannelDesc(cyruntime.cudaChannelFormatDesc*
15911591
{{endif}}
15921592

15931593
{{if 'cudaCreateChannelDesc' in found_functions}}
1594-
1595-
cdef cyruntime.cudaChannelFormatDesc _cudaCreateChannelDesc(int x, int y, int z, int w, cyruntime.cudaChannelFormatKind f) nogil:
1594+
@cython.show_performance_hints(False)
1595+
cdef cyruntime.cudaChannelFormatDesc _cudaCreateChannelDesc(int x, int y, int z, int w, cyruntime.cudaChannelFormatKind f) except* nogil:
15961596
cdef bint usePTDS = cudaPythonInit()
15971597
if usePTDS:
15981598
return ptds._cudaCreateChannelDesc(x, y, z, w, f)
@@ -2608,26 +2608,26 @@ cdef cyruntime.cudaError_t _cudaGetKernel(cyruntime.cudaKernel_t* kernelPtr, con
26082608
{{endif}}
26092609

26102610
{{if 'make_cudaPitchedPtr' in found_functions}}
2611-
2612-
cdef cyruntime.cudaPitchedPtr _make_cudaPitchedPtr(void* d, size_t p, size_t xsz, size_t ysz) nogil:
2611+
@cython.show_performance_hints(False)
2612+
cdef cyruntime.cudaPitchedPtr _make_cudaPitchedPtr(void* d, size_t p, size_t xsz, size_t ysz) except* nogil:
26132613
cdef bint usePTDS = cudaPythonInit()
26142614
if usePTDS:
26152615
return ptds._make_cudaPitchedPtr(d, p, xsz, ysz)
26162616
return make_cudaPitchedPtr(d, p, xsz, ysz)
26172617
{{endif}}
26182618

26192619
{{if 'make_cudaPos' in found_functions}}
2620-
2621-
cdef cyruntime.cudaPos _make_cudaPos(size_t x, size_t y, size_t z) nogil:
2620+
@cython.show_performance_hints(False)
2621+
cdef cyruntime.cudaPos _make_cudaPos(size_t x, size_t y, size_t z) except* nogil:
26222622
cdef bint usePTDS = cudaPythonInit()
26232623
if usePTDS:
26242624
return ptds._make_cudaPos(x, y, z)
26252625
return make_cudaPos(x, y, z)
26262626
{{endif}}
26272627

26282628
{{if 'make_cudaExtent' in found_functions}}
2629-
2630-
cdef cyruntime.cudaExtent _make_cudaExtent(size_t w, size_t h, size_t d) nogil:
2629+
@cython.show_performance_hints(False)
2630+
cdef cyruntime.cudaExtent _make_cudaExtent(size_t w, size_t h, size_t d) except* nogil:
26312631
cdef bint usePTDS = cudaPythonInit()
26322632
if usePTDS:
26332633
return ptds._make_cudaExtent(w, h, d)

cuda_bindings/cuda/bindings/_bindings/cyruntime_ptds.pxd.in

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -886,7 +886,7 @@ cdef cyruntime.cudaError_t _cudaGetChannelDesc(cyruntime.cudaChannelFormatDesc*
886886

887887
{{if 'cudaCreateChannelDesc' in found_functions}}
888888

889-
cdef cyruntime.cudaChannelFormatDesc _cudaCreateChannelDesc(int x, int y, int z, int w, cyruntime.cudaChannelFormatKind f) nogil
889+
cdef cyruntime.cudaChannelFormatDesc _cudaCreateChannelDesc(int x, int y, int z, int w, cyruntime.cudaChannelFormatKind f) except* nogil
890890
{{endif}}
891891

892892
{{if 'cudaCreateTextureObject' in found_functions}}
@@ -1451,17 +1451,17 @@ cdef cyruntime.cudaError_t _cudaGetKernel(cyruntime.cudaKernel_t* kernelPtr, con
14511451

14521452
{{if 'make_cudaPitchedPtr' in found_functions}}
14531453

1454-
cdef cyruntime.cudaPitchedPtr _make_cudaPitchedPtr(void* d, size_t p, size_t xsz, size_t ysz) nogil
1454+
cdef cyruntime.cudaPitchedPtr _make_cudaPitchedPtr(void* d, size_t p, size_t xsz, size_t ysz) except* nogil
14551455
{{endif}}
14561456

14571457
{{if 'make_cudaPos' in found_functions}}
14581458

1459-
cdef cyruntime.cudaPos _make_cudaPos(size_t x, size_t y, size_t z) nogil
1459+
cdef cyruntime.cudaPos _make_cudaPos(size_t x, size_t y, size_t z) except* nogil
14601460
{{endif}}
14611461

14621462
{{if 'make_cudaExtent' in found_functions}}
14631463

1464-
cdef cyruntime.cudaExtent _make_cudaExtent(size_t w, size_t h, size_t d) nogil
1464+
cdef cyruntime.cudaExtent _make_cudaExtent(size_t w, size_t h, size_t d) except* nogil
14651465
{{endif}}
14661466

14671467
{{if 'cudaProfilerStart' in found_functions}}

cuda_bindings/cuda/bindings/_bindings/cyruntime_ptds.pyx.in

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1059,8 +1059,8 @@ cdef cyruntime.cudaError_t _cudaGetChannelDesc(cyruntime.cudaChannelFormatDesc*
10591059
{{endif}}
10601060

10611061
{{if 'cudaCreateChannelDesc' in found_functions}}
1062-
1063-
cdef cyruntime.cudaChannelFormatDesc _cudaCreateChannelDesc(int x, int y, int z, int w, cyruntime.cudaChannelFormatKind f) nogil:
1062+
@cython.show_performance_hints(False)
1063+
cdef cyruntime.cudaChannelFormatDesc _cudaCreateChannelDesc(int x, int y, int z, int w, cyruntime.cudaChannelFormatKind f) except* nogil:
10641064
return cudaCreateChannelDesc(x, y, z, w, f)
10651065
{{endif}}
10661066

@@ -1737,20 +1737,20 @@ cdef cyruntime.cudaError_t _cudaGetKernel(cyruntime.cudaKernel_t* kernelPtr, con
17371737
{{endif}}
17381738

17391739
{{if 'make_cudaPitchedPtr' in found_functions}}
1740-
1741-
cdef cyruntime.cudaPitchedPtr _make_cudaPitchedPtr(void* d, size_t p, size_t xsz, size_t ysz) nogil:
1740+
@cython.show_performance_hints(False)
1741+
cdef cyruntime.cudaPitchedPtr _make_cudaPitchedPtr(void* d, size_t p, size_t xsz, size_t ysz) except* nogil:
17421742
return make_cudaPitchedPtr(d, p, xsz, ysz)
17431743
{{endif}}
17441744

17451745
{{if 'make_cudaPos' in found_functions}}
1746-
1747-
cdef cyruntime.cudaPos _make_cudaPos(size_t x, size_t y, size_t z) nogil:
1746+
@cython.show_performance_hints(False)
1747+
cdef cyruntime.cudaPos _make_cudaPos(size_t x, size_t y, size_t z) except* nogil:
17481748
return make_cudaPos(x, y, z)
17491749
{{endif}}
17501750

17511751
{{if 'make_cudaExtent' in found_functions}}
1752-
1753-
cdef cyruntime.cudaExtent _make_cudaExtent(size_t w, size_t h, size_t d) nogil:
1752+
@cython.show_performance_hints(False)
1753+
cdef cyruntime.cudaExtent _make_cudaExtent(size_t w, size_t h, size_t d) except* nogil:
17541754
return make_cudaExtent(w, h, d)
17551755
{{endif}}
17561756

cuda_bindings/cuda/bindings/cydriver.pyx.in

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77
# is strictly prohibited.
88
#
99
# This code was automatically generated with version 12.8.0. Do not modify it directly.
10+
import cython
11+
cimport cython
12+
from libcpp.map cimport map
13+
from libc.stdlib cimport malloc, free
1014
cimport cuda.bindings._bindings.cydriver as cydriver
1115

1216
{{if 'cuGetErrorString' in found_functions}}
@@ -2816,3 +2820,5 @@ cdef CUresult cuGraphicsVDPAURegisterVideoSurface(CUgraphicsResource* pCudaResou
28162820
cdef CUresult cuGraphicsVDPAURegisterOutputSurface(CUgraphicsResource* pCudaResource, VdpOutputSurface vdpSurface, unsigned int flags) except ?CUDA_ERROR_NOT_FOUND nogil:
28172821
return cydriver._cuGraphicsVDPAURegisterOutputSurface(pCudaResource, vdpSurface, flags)
28182822
{{endif}}
2823+
2824+

cuda_bindings/cuda/bindings/cyruntime.pxd.in

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2626,7 +2626,7 @@ cdef cudaError_t cudaGetChannelDesc(cudaChannelFormatDesc* desc, cudaArray_const
26262626

26272627
{{if 'cudaCreateChannelDesc' in found_functions}}
26282628

2629-
cdef cudaChannelFormatDesc cudaCreateChannelDesc(int x, int y, int z, int w, cudaChannelFormatKind f) nogil
2629+
cdef cudaChannelFormatDesc cudaCreateChannelDesc(int x, int y, int z, int w, cudaChannelFormatKind f) except* nogil
26302630
{{endif}}
26312631

26322632
{{if 'cudaCreateTextureObject' in found_functions}}
@@ -3191,17 +3191,17 @@ cdef cudaError_t cudaGetKernel(cudaKernel_t* kernelPtr, const void* entryFuncAdd
31913191

31923192
{{if 'make_cudaPitchedPtr' in found_functions}}
31933193

3194-
cdef cudaPitchedPtr make_cudaPitchedPtr(void* d, size_t p, size_t xsz, size_t ysz) nogil
3194+
cdef cudaPitchedPtr make_cudaPitchedPtr(void* d, size_t p, size_t xsz, size_t ysz) except* nogil
31953195
{{endif}}
31963196

31973197
{{if 'make_cudaPos' in found_functions}}
31983198

3199-
cdef cudaPos make_cudaPos(size_t x, size_t y, size_t z) nogil
3199+
cdef cudaPos make_cudaPos(size_t x, size_t y, size_t z) except* nogil
32003200
{{endif}}
32013201

32023202
{{if 'make_cudaExtent' in found_functions}}
32033203

3204-
cdef cudaExtent make_cudaExtent(size_t w, size_t h, size_t d) nogil
3204+
cdef cudaExtent make_cudaExtent(size_t w, size_t h, size_t d) except* nogil
32053205
{{endif}}
32063206

32073207
{{if True}}

cuda_bindings/cuda/bindings/cyruntime.pyx.in

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#
99
# This code was automatically generated with version 12.8.0. Do not modify it directly.
1010
import cython
11+
cimport cython
1112
from libcpp.map cimport map
1213
from libc.stdlib cimport malloc, free
1314
cimport cuda.bindings._bindings.cyruntime as cyruntime
@@ -1145,8 +1146,8 @@ cdef cudaError_t cudaGetChannelDesc(cudaChannelFormatDesc* desc, cudaArray_const
11451146
{{endif}}
11461147

11471148
{{if 'cudaCreateChannelDesc' in found_functions}}
1148-
1149-
cdef cudaChannelFormatDesc cudaCreateChannelDesc(int x, int y, int z, int w, cudaChannelFormatKind f) nogil:
1149+
@cython.show_performance_hints(False)
1150+
cdef cudaChannelFormatDesc cudaCreateChannelDesc(int x, int y, int z, int w, cudaChannelFormatKind f) except* nogil:
11501151
return cyruntime._cudaCreateChannelDesc(x, y, z, w, f)
11511152
{{endif}}
11521153

@@ -1823,20 +1824,20 @@ cdef cudaError_t cudaGetKernel(cudaKernel_t* kernelPtr, const void* entryFuncAdd
18231824
{{endif}}
18241825

18251826
{{if 'make_cudaPitchedPtr' in found_functions}}
1826-
1827-
cdef cudaPitchedPtr make_cudaPitchedPtr(void* d, size_t p, size_t xsz, size_t ysz) nogil:
1827+
@cython.show_performance_hints(False)
1828+
cdef cudaPitchedPtr make_cudaPitchedPtr(void* d, size_t p, size_t xsz, size_t ysz) except* nogil:
18281829
return cyruntime._make_cudaPitchedPtr(d, p, xsz, ysz)
18291830
{{endif}}
18301831

18311832
{{if 'make_cudaPos' in found_functions}}
1832-
1833-
cdef cudaPos make_cudaPos(size_t x, size_t y, size_t z) nogil:
1833+
@cython.show_performance_hints(False)
1834+
cdef cudaPos make_cudaPos(size_t x, size_t y, size_t z) except* nogil:
18341835
return cyruntime._make_cudaPos(x, y, z)
18351836
{{endif}}
18361837

18371838
{{if 'make_cudaExtent' in found_functions}}
1838-
1839-
cdef cudaExtent make_cudaExtent(size_t w, size_t h, size_t d) nogil:
1839+
@cython.show_performance_hints(False)
1840+
cdef cudaExtent make_cudaExtent(size_t w, size_t h, size_t d) except* nogil:
18401841
return cyruntime._make_cudaExtent(w, h, d)
18411842
{{endif}}
18421843

0 commit comments

Comments
 (0)