Skip to content

Commit da283d5

Browse files
committed
Convert objects to int
1 parent 54ce994 commit da283d5

10 files changed

Lines changed: 543 additions & 556 deletions

File tree

cuda_bindings/cuda/bindings/_v2/nvrtc.pyx

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# SPDX-License-Identifier: Apache-2.0
44
#
55
# This code was automatically generated across versions from 12.9.0 to 13.3.0. Do not modify it directly.
6-
# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=a36c7e54cf29166832dd9aebc1fa71cc3649498794a2846e707396419caebe10
6+
# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=e48732452ebf6c1dda859086b349512cf0f2ef367fc16c46e887817a122d2e02
77

88

99
# <<<< PREAMBLE CONTENT >>>>
@@ -640,7 +640,6 @@ cpdef tuple version():
640640
641641
Returns:
642642
A 2-tuple containing:
643-
644643
- int: CUDA Runtime Compilation major version number.
645644
- int: CUDA Runtime Compilation minor version number.
646645
@@ -657,6 +656,7 @@ cpdef tuple version():
657656
cpdef int get_num_supported_archs() except? -1:
658657
"""nvrtcGetNumSupportedArchs sets the output parameter ``num_archs`` with the number of architectures supported by NVRTC. This can then be used to pass an array to ``nvrtcGetSupportedArchs`` to get the supported architectures.
659658
659+
see ``nvrtcGetSupportedArchs``.
660660
Returns:
661661
int: number of supported architectures.
662662
@@ -672,6 +672,7 @@ cpdef int get_num_supported_archs() except? -1:
672672
cpdef object get_supported_archs():
673673
"""nvrtcGetSupportedArchs populates the array passed via the output parameter ``supported_archs`` with the architectures supported by NVRTC. The array is sorted in the ascending order. The size of the array to be passed can be determined using ``nvrtcGetNumSupportedArchs``.
674674
675+
see ``nvrtcGetNumSupportedArchs``.
675676
Returns:
676677
int: sorted array of supported architectures.
677678
@@ -881,6 +882,8 @@ cpdef bytes get_optix_ir(intptr_t prog):
881882
cpdef size_t get_program_log_size(intptr_t prog) except? 0:
882883
"""nvrtcGetProgramLogSize sets ``log_size_ret`` with the size of the log generated by the previous compilation of ``prog`` (including the trailing ``NULL``).
883884
885+
Note that compilation log may be generated with warnings and informative
886+
messages, even when the compilation of ``prog`` succeeds.
884887
Args:
885888
prog (intptr_t): CUDA Runtime Compilation program.
886889
@@ -925,11 +928,12 @@ cpdef bytes get_program_log(intptr_t prog):
925928
cpdef add_name_expression(intptr_t prog, name_expression):
926929
"""nvrtcAddNameExpression notes the given name expression denoting the address of a global function or device/__constant__ variable.
927930
931+
The identical name expression string must be provided on a subsequent call to
932+
nvrtcGetLoweredName to extract the lowered name.
928933
Args:
929934
prog (intptr_t): CUDA Runtime Compilation program.
930-
name_expression (str): constant expression denoting the
931-
address of a global function or device/__constant__
932-
variable.
935+
name_expression (str): constant expression denoting the address of
936+
a global function or device/__constant__ variable.
933937
934938
.. seealso:: `nvrtcAddNameExpression`
935939
"""
@@ -946,8 +950,8 @@ cpdef size_t get_pch_heap_size() except? 0:
946950
"""retrieve the current size of the PCH Heap.
947951
948952
Returns:
949-
size_t: pointer to location where the size of the PCH Heap
950-
will be stored.
953+
size_t: pointer to location where the size of the PCH Heap will be
954+
stored.
951955
952956
.. seealso:: `nvrtcGetPCHHeapSize`
953957
"""
@@ -961,6 +965,9 @@ cpdef size_t get_pch_heap_size() except? 0:
961965
cpdef set_pch_heap_size(size_t size):
962966
"""set the size of the PCH Heap.
963967
968+
The requested size may be rounded up to a platform dependent alignment (e.g.
969+
page size). If the PCH Heap has already been allocated, the heap memory will be
970+
freed and a new PCH Heap will be allocated.
964971
Args:
965972
size (size_t): requested size of the PCH Heap, in bytes.
966973
@@ -974,6 +981,19 @@ cpdef set_pch_heap_size(size_t size):
974981
cpdef int get_pch_create_status(intptr_t prog) except? -1:
975982
"""returns the PCH creation status.
976983
984+
NVRTC_SUCCESS indicates that the PCH was successfully created.
985+
NVRTC_ERROR_NO_PCH_CREATE_ATTEMPTED indicates that no PCH creation was
986+
attempted, either because PCH functionality was not requested during the
987+
preceding nvrtcCompileProgram call, or automatic PCH processing was requested,
988+
and compiler chose not to create a PCH file.
989+
NVRTC_ERROR_PCH_CREATE_HEAP_EXHAUSTED indicates that a PCH file could
990+
potentially have been created, but the compiler ran out space in the PCH heap.
991+
In this scenario, the :func:`get_pch_heap_size_required` can be used to query
992+
the required heap size, the heap can be reallocated for this size with
993+
:func:`set_pch_heap_size` and PCH creation may be reattempted again invoking
994+
:func:`compile_program` with a new NVRTC program instance.
995+
NVRTC_ERROR_PCH_CREATE indicates that an error condition prevented the PCH file
996+
from being created.
977997
Args:
978998
prog (intptr_t): CUDA Runtime Compilation program.
979999

cuda_bindings/cuda/bindings/cudla.pxd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# SPDX-License-Identifier: Apache-2.0
33

44
# This code was automatically generated across versions from 1.5.0 to 13.3.0. Do not modify it directly.
5-
# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=b82680ec867e23638b173760105c35030e0cba5c9a8b3bb536ce5bb3381ec1fb
5+
# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=3b52467aafbb78d33c99d8be6d3acdd552c8aa0851758d01932080aebaec5213
66

77

88
# <<<< PREAMBLE CONTENT >>>>
@@ -55,7 +55,7 @@ cpdef intptr_t create_device(uint64_t device, uint32_t flags) except *
5555
cpdef intptr_t mem_register(intptr_t dev_handle, intptr_t ptr, size_t size, uint32_t flags) except *
5656
cpdef intptr_t module_load_from_memory(intptr_t dev_handle, p_module, size_t module_size, uint32_t flags) except *
5757
cpdef module_unload(intptr_t h_module, uint32_t flags)
58-
cpdef submit_task(intptr_t dev_handle, intptr_t ptr_to_tasks, uint32_t num_tasks, intptr_t stream, uint32_t flags)
58+
cpdef submit_task(intptr_t dev_handle, ptr_to_tasks, uint32_t num_tasks, intptr_t stream, uint32_t flags)
5959
cpdef object device_get_attribute(intptr_t dev_handle, int attrib)
6060
cpdef mem_unregister(intptr_t dev_handle, intptr_t dev_ptr)
6161
cpdef int get_last_error(intptr_t dev_handle) except? 0

cuda_bindings/cuda/bindings/cudla.pyx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# SPDX-License-Identifier: Apache-2.0
33

44
# This code was automatically generated across versions from 1.5.0 to 13.3.0. Do not modify it directly.
5-
# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=3c177b7a0328c0f6f16067c8c9f4e5a002bd019e8c17c017ba9f77af21da8d75
5+
# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=6448344915220edf6a2a1f4aee3377cee10c3c0a05db19c5ce37c6595bb52a5c
66

77

88
# <<<< PREAMBLE CONTENT >>>>
@@ -1804,9 +1804,10 @@ cpdef module_unload(intptr_t h_module, uint32_t flags):
18041804
check_status(__status__)
18051805

18061806

1807-
cpdef submit_task(intptr_t dev_handle, intptr_t ptr_to_tasks, uint32_t num_tasks, intptr_t stream, uint32_t flags):
1807+
cpdef submit_task(intptr_t dev_handle, ptr_to_tasks, uint32_t num_tasks, intptr_t stream, uint32_t flags):
1808+
cdef intptr_t _ptr_to_tasks_ptr_ = int(ptr_to_tasks)
18081809
with nogil:
1809-
__status__ = cudlaSubmitTask(<const DevHandle>dev_handle, <const cudlaTask* const>ptr_to_tasks, <const uint32_t>num_tasks, <void* const>stream, <const uint32_t>flags)
1810+
__status__ = cudlaSubmitTask(<const DevHandle>dev_handle, <const cudlaTask* const>_ptr_to_tasks_ptr_, <const uint32_t>num_tasks, <void* const>stream, <const uint32_t>flags)
18101811
check_status(__status__)
18111812

18121813

cuda_bindings/cuda/bindings/cufile.pxd

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# SPDX-License-Identifier: Apache-2.0
44
#
55
# This code was automatically generated across versions from 12.9.1 to 13.3.0. Do not modify it directly.
6-
# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=b10e4f1751ee5423db23c6fc953cb0ae37bff7e8937bf1d39ac5fd6eeb0e4e87
6+
# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=232c1336341a3bd41bdcac568f24b320c839206e07a249bb4425ab726c1838be
77

88

99

@@ -53,7 +53,7 @@ ctypedef CUfileP2PFlags_t _P2PFlags
5353
# Functions
5454
###############################################################################
5555

56-
cpdef intptr_t handle_register(intptr_t descr) except? 0
56+
cpdef intptr_t handle_register(descr) except? 0
5757
cpdef void handle_deregister(intptr_t fh) except*
5858
cpdef buf_register(intptr_t buf_ptr_base, size_t length, int flags)
5959
cpdef buf_deregister(intptr_t buf_ptr_base)
@@ -65,8 +65,8 @@ cpdef driver_set_max_direct_io_size(size_t max_direct_io_size)
6565
cpdef driver_set_max_cache_size(size_t max_cache_size)
6666
cpdef driver_set_max_pinned_mem_size(size_t max_pinned_size)
6767
cpdef intptr_t batch_io_set_up(unsigned nr) except? 0
68-
cpdef batch_io_submit(intptr_t batch_idp, unsigned nr, intptr_t iocbp, unsigned int flags)
69-
cpdef batch_io_get_status(intptr_t batch_idp, unsigned min_nr, intptr_t nr, intptr_t iocbp, intptr_t timeout)
68+
cpdef batch_io_submit(intptr_t batch_idp, unsigned nr, iocbp, unsigned int flags)
69+
cpdef batch_io_get_status(intptr_t batch_idp, unsigned min_nr, intptr_t nr, iocbp, intptr_t timeout)
7070
cpdef batch_io_cancel(intptr_t batch_idp)
7171
cpdef void batch_io_destroy(intptr_t batch_idp) except*
7272
cpdef read_async(intptr_t fh, intptr_t buf_ptr_base, intptr_t size_p, intptr_t file_offset_p, intptr_t buf_ptr_offset_p, intptr_t bytes_read_p, intptr_t stream)
@@ -86,9 +86,9 @@ cpdef int get_stats_level() except? 0
8686
cpdef stats_start()
8787
cpdef stats_stop()
8888
cpdef stats_reset()
89-
cpdef get_stats_l1(intptr_t stats)
90-
cpdef get_stats_l2(intptr_t stats)
91-
cpdef get_stats_l3(intptr_t stats)
89+
cpdef get_stats_l1(stats)
90+
cpdef get_stats_l2(stats)
91+
cpdef get_stats_l3(stats)
9292
cpdef size_t get_bar_size_in_kb(int gpu_index) except? 0
9393
cpdef set_parameter_posix_pool_slab_array(intptr_t size_values, intptr_t count_values, int len)
9494
cpdef get_parameter_posix_pool_slab_array(intptr_t size_values, intptr_t count_values, int len)

0 commit comments

Comments
 (0)