Skip to content

Commit 37a929f

Browse files
leofangclaude
andcommitted
Update cynvrtc.pyx to use _internal cimport (cybind convention)
- cynvrtc.pyx now uses "from ._internal cimport nvrtc as _nvrtc" instead of the legacy "cimport _bindings.cynvrtc as cynvrtc" - Function wrappers reference _nvrtc._funcName() matching cybind style - cynvrtc.pxd gets proper template header Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 7082b2d commit 37a929f

2 files changed

Lines changed: 33 additions & 30 deletions

File tree

cuda_bindings/cuda/bindings/cynvrtc.pxd

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
#
23
# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE
3-
4-
# This code was automatically generated with version 13.2.0, generator version 0.3.1.dev1364+ged01d643e. Do not modify it directly.
4+
#
5+
# This code was automatically generated with version 13.2.0. Do not modify it directly.
56

67
from libc.stdint cimport uint32_t, uint64_t
78

Lines changed: 30 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,84 +1,86 @@
11
# SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
#
23
# SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE
4+
#
5+
# This code was automatically generated with version 13.2.0. Do not modify it directly.
36

4-
# This code was automatically generated with version 13.2.0, generator version 0.3.1.dev1364+ged01d643e. Do not modify it directly.
5-
cimport cuda.bindings._bindings.cynvrtc as cynvrtc
7+
from ._internal cimport nvrtc as _nvrtc
68

79
cdef const char* nvrtcGetErrorString(nvrtcResult result) except ?NULL nogil:
8-
return cynvrtc._nvrtcGetErrorString(result)
10+
return _nvrtc._nvrtcGetErrorString(result)
911

1012
cdef nvrtcResult nvrtcVersion(int* major, int* minor) except ?NVRTC_ERROR_INVALID_INPUT nogil:
11-
return cynvrtc._nvrtcVersion(major, minor)
13+
return _nvrtc._nvrtcVersion(major, minor)
1214

1315
cdef nvrtcResult nvrtcGetNumSupportedArchs(int* numArchs) except ?NVRTC_ERROR_INVALID_INPUT nogil:
14-
return cynvrtc._nvrtcGetNumSupportedArchs(numArchs)
16+
return _nvrtc._nvrtcGetNumSupportedArchs(numArchs)
1517

1618
cdef nvrtcResult nvrtcGetSupportedArchs(int* supportedArchs) except ?NVRTC_ERROR_INVALID_INPUT nogil:
17-
return cynvrtc._nvrtcGetSupportedArchs(supportedArchs)
19+
return _nvrtc._nvrtcGetSupportedArchs(supportedArchs)
1820

1921
cdef nvrtcResult nvrtcCreateProgram(nvrtcProgram* prog, const char* src, const char* name, int numHeaders, const char** headers, const char** includeNames) except ?NVRTC_ERROR_INVALID_INPUT nogil:
20-
return cynvrtc._nvrtcCreateProgram(prog, src, name, numHeaders, headers, includeNames)
22+
return _nvrtc._nvrtcCreateProgram(prog, src, name, numHeaders, headers, includeNames)
2123

2224
cdef nvrtcResult nvrtcDestroyProgram(nvrtcProgram* prog) except ?NVRTC_ERROR_INVALID_INPUT nogil:
23-
return cynvrtc._nvrtcDestroyProgram(prog)
25+
return _nvrtc._nvrtcDestroyProgram(prog)
2426

2527
cdef nvrtcResult nvrtcCompileProgram(nvrtcProgram prog, int numOptions, const char** options) except ?NVRTC_ERROR_INVALID_INPUT nogil:
26-
return cynvrtc._nvrtcCompileProgram(prog, numOptions, options)
28+
return _nvrtc._nvrtcCompileProgram(prog, numOptions, options)
2729

2830
cdef nvrtcResult nvrtcGetPTXSize(nvrtcProgram prog, size_t* ptxSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil:
29-
return cynvrtc._nvrtcGetPTXSize(prog, ptxSizeRet)
31+
return _nvrtc._nvrtcGetPTXSize(prog, ptxSizeRet)
3032

3133
cdef nvrtcResult nvrtcGetPTX(nvrtcProgram prog, char* ptx) except ?NVRTC_ERROR_INVALID_INPUT nogil:
32-
return cynvrtc._nvrtcGetPTX(prog, ptx)
34+
return _nvrtc._nvrtcGetPTX(prog, ptx)
3335

3436
cdef nvrtcResult nvrtcGetCUBINSize(nvrtcProgram prog, size_t* cubinSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil:
35-
return cynvrtc._nvrtcGetCUBINSize(prog, cubinSizeRet)
37+
return _nvrtc._nvrtcGetCUBINSize(prog, cubinSizeRet)
3638

3739
cdef nvrtcResult nvrtcGetCUBIN(nvrtcProgram prog, char* cubin) except ?NVRTC_ERROR_INVALID_INPUT nogil:
38-
return cynvrtc._nvrtcGetCUBIN(prog, cubin)
40+
return _nvrtc._nvrtcGetCUBIN(prog, cubin)
3941

4042
cdef nvrtcResult nvrtcGetLTOIRSize(nvrtcProgram prog, size_t* LTOIRSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil:
41-
return cynvrtc._nvrtcGetLTOIRSize(prog, LTOIRSizeRet)
43+
return _nvrtc._nvrtcGetLTOIRSize(prog, LTOIRSizeRet)
4244

4345
cdef nvrtcResult nvrtcGetLTOIR(nvrtcProgram prog, char* LTOIR) except ?NVRTC_ERROR_INVALID_INPUT nogil:
44-
return cynvrtc._nvrtcGetLTOIR(prog, LTOIR)
46+
return _nvrtc._nvrtcGetLTOIR(prog, LTOIR)
4547

4648
cdef nvrtcResult nvrtcGetOptiXIRSize(nvrtcProgram prog, size_t* optixirSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil:
47-
return cynvrtc._nvrtcGetOptiXIRSize(prog, optixirSizeRet)
49+
return _nvrtc._nvrtcGetOptiXIRSize(prog, optixirSizeRet)
4850

4951
cdef nvrtcResult nvrtcGetOptiXIR(nvrtcProgram prog, char* optixir) except ?NVRTC_ERROR_INVALID_INPUT nogil:
50-
return cynvrtc._nvrtcGetOptiXIR(prog, optixir)
52+
return _nvrtc._nvrtcGetOptiXIR(prog, optixir)
5153

5254
cdef nvrtcResult nvrtcGetProgramLogSize(nvrtcProgram prog, size_t* logSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil:
53-
return cynvrtc._nvrtcGetProgramLogSize(prog, logSizeRet)
55+
return _nvrtc._nvrtcGetProgramLogSize(prog, logSizeRet)
5456

5557
cdef nvrtcResult nvrtcGetProgramLog(nvrtcProgram prog, char* log) except ?NVRTC_ERROR_INVALID_INPUT nogil:
56-
return cynvrtc._nvrtcGetProgramLog(prog, log)
58+
return _nvrtc._nvrtcGetProgramLog(prog, log)
5759

5860
cdef nvrtcResult nvrtcAddNameExpression(nvrtcProgram prog, const char* name_expression) except ?NVRTC_ERROR_INVALID_INPUT nogil:
59-
return cynvrtc._nvrtcAddNameExpression(prog, name_expression)
61+
return _nvrtc._nvrtcAddNameExpression(prog, name_expression)
6062

6163
cdef nvrtcResult nvrtcGetLoweredName(nvrtcProgram prog, const char* name_expression, const char** lowered_name) except ?NVRTC_ERROR_INVALID_INPUT nogil:
62-
return cynvrtc._nvrtcGetLoweredName(prog, name_expression, lowered_name)
64+
return _nvrtc._nvrtcGetLoweredName(prog, name_expression, lowered_name)
6365

6466
cdef nvrtcResult nvrtcGetPCHHeapSize(size_t* ret) except ?NVRTC_ERROR_INVALID_INPUT nogil:
65-
return cynvrtc._nvrtcGetPCHHeapSize(ret)
67+
return _nvrtc._nvrtcGetPCHHeapSize(ret)
6668

6769
cdef nvrtcResult nvrtcSetPCHHeapSize(size_t size) except ?NVRTC_ERROR_INVALID_INPUT nogil:
68-
return cynvrtc._nvrtcSetPCHHeapSize(size)
70+
return _nvrtc._nvrtcSetPCHHeapSize(size)
6971

7072
cdef nvrtcResult nvrtcGetPCHCreateStatus(nvrtcProgram prog) except ?NVRTC_ERROR_INVALID_INPUT nogil:
71-
return cynvrtc._nvrtcGetPCHCreateStatus(prog)
73+
return _nvrtc._nvrtcGetPCHCreateStatus(prog)
7274

7375
cdef nvrtcResult nvrtcGetPCHHeapSizeRequired(nvrtcProgram prog, size_t* size) except ?NVRTC_ERROR_INVALID_INPUT nogil:
74-
return cynvrtc._nvrtcGetPCHHeapSizeRequired(prog, size)
76+
return _nvrtc._nvrtcGetPCHHeapSizeRequired(prog, size)
7577

7678
cdef nvrtcResult nvrtcSetFlowCallback(nvrtcProgram prog, void* callback, void* payload) except ?NVRTC_ERROR_INVALID_INPUT nogil:
77-
return cynvrtc._nvrtcSetFlowCallback(prog, callback, payload)
79+
return _nvrtc._nvrtcSetFlowCallback(prog, callback, payload)
7880

7981
cdef nvrtcResult nvrtcGetTileIRSize(nvrtcProgram prog, size_t* TileIRSizeRet) except ?NVRTC_ERROR_INVALID_INPUT nogil:
80-
return cynvrtc._nvrtcGetTileIRSize(prog, TileIRSizeRet)
82+
return _nvrtc._nvrtcGetTileIRSize(prog, TileIRSizeRet)
8183

8284
cdef nvrtcResult nvrtcGetTileIR(nvrtcProgram prog, char* TileIR) except ?NVRTC_ERROR_INVALID_INPUT nogil:
83-
return cynvrtc._nvrtcGetTileIR(prog, TileIR)
85+
return _nvrtc._nvrtcGetTileIR(prog, TileIR)
8486

0 commit comments

Comments
 (0)