Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 27 additions & 7 deletions cuda_bindings/cuda/bindings/_v2/nvrtc.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# SPDX-License-Identifier: Apache-2.0
#
# This code was automatically generated across versions from 12.9.0 to 13.3.0. Do not modify it directly.
# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=a36c7e54cf29166832dd9aebc1fa71cc3649498794a2846e707396419caebe10
# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=e48732452ebf6c1dda859086b349512cf0f2ef367fc16c46e887817a122d2e02


# <<<< PREAMBLE CONTENT >>>>
Expand Down Expand Up @@ -640,7 +640,6 @@ cpdef tuple version():

Returns:
A 2-tuple containing:

- int: CUDA Runtime Compilation major version number.
- int: CUDA Runtime Compilation minor version number.

Expand All @@ -657,6 +656,7 @@ cpdef tuple version():
cpdef int get_num_supported_archs() except? -1:
"""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.

see ``nvrtcGetSupportedArchs``.
Returns:
int: number of supported architectures.

Expand All @@ -672,6 +672,7 @@ cpdef int get_num_supported_archs() except? -1:
cpdef object get_supported_archs():
"""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``.

see ``nvrtcGetNumSupportedArchs``.
Returns:
int: sorted array of supported architectures.

Expand Down Expand Up @@ -881,6 +882,8 @@ cpdef bytes get_optix_ir(intptr_t prog):
cpdef size_t get_program_log_size(intptr_t prog) except? 0:
"""nvrtcGetProgramLogSize sets ``log_size_ret`` with the size of the log generated by the previous compilation of ``prog`` (including the trailing ``NULL``).

Note that compilation log may be generated with warnings and informative
messages, even when the compilation of ``prog`` succeeds.
Args:
prog (intptr_t): CUDA Runtime Compilation program.

Expand Down Expand Up @@ -925,11 +928,12 @@ cpdef bytes get_program_log(intptr_t prog):
cpdef add_name_expression(intptr_t prog, name_expression):
"""nvrtcAddNameExpression notes the given name expression denoting the address of a global function or device/__constant__ variable.

The identical name expression string must be provided on a subsequent call to
nvrtcGetLoweredName to extract the lowered name.
Args:
prog (intptr_t): CUDA Runtime Compilation program.
name_expression (str): constant expression denoting the
address of a global function or device/__constant__
variable.
name_expression (str): constant expression denoting the address of
a global function or device/__constant__ variable.

.. seealso:: `nvrtcAddNameExpression`
"""
Expand All @@ -946,8 +950,8 @@ cpdef size_t get_pch_heap_size() except? 0:
"""retrieve the current size of the PCH Heap.

Returns:
size_t: pointer to location where the size of the PCH Heap
will be stored.
size_t: pointer to location where the size of the PCH Heap will be
stored.

.. seealso:: `nvrtcGetPCHHeapSize`
"""
Expand All @@ -961,6 +965,9 @@ cpdef size_t get_pch_heap_size() except? 0:
cpdef set_pch_heap_size(size_t size):
"""set the size of the PCH Heap.

The requested size may be rounded up to a platform dependent alignment (e.g.
page size). If the PCH Heap has already been allocated, the heap memory will be
freed and a new PCH Heap will be allocated.
Args:
size (size_t): requested size of the PCH Heap, in bytes.

Expand All @@ -974,6 +981,19 @@ cpdef set_pch_heap_size(size_t size):
cpdef int get_pch_create_status(intptr_t prog) except? -1:
"""returns the PCH creation status.

NVRTC_SUCCESS indicates that the PCH was successfully created.
NVRTC_ERROR_NO_PCH_CREATE_ATTEMPTED indicates that no PCH creation was
attempted, either because PCH functionality was not requested during the
preceding nvrtcCompileProgram call, or automatic PCH processing was requested,
and compiler chose not to create a PCH file.
NVRTC_ERROR_PCH_CREATE_HEAP_EXHAUSTED indicates that a PCH file could
potentially have been created, but the compiler ran out space in the PCH heap.
In this scenario, the :func:`get_pch_heap_size_required` can be used to query
the required heap size, the heap can be reallocated for this size with
:func:`set_pch_heap_size` and PCH creation may be reattempted again invoking
:func:`compile_program` with a new NVRTC program instance.
NVRTC_ERROR_PCH_CREATE indicates that an error condition prevented the PCH file
from being created.
Args:
prog (intptr_t): CUDA Runtime Compilation program.

Expand Down
46 changes: 20 additions & 26 deletions cuda_bindings/cuda/bindings/cufile.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# SPDX-License-Identifier: Apache-2.0
#
# This code was automatically generated across versions from 12.9.1 to 13.3.0. Do not modify it directly.
# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=df46a6921d93f83249134c7705b2809f57145b6fb72f6f40c4657ecd1b443b81
# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=a2038a088d013d4a0568f17b682d3e8b29e0d23629bd30d2424a9a3b96dde13b


# <<<< PREAMBLE CONTENT >>>>
Expand Down Expand Up @@ -3013,12 +3013,10 @@ cpdef intptr_t handle_register(intptr_t descr) except? 0:
"""cuFileHandleRegister is required, and performs extra checking that is memoized to provide increased performance on later cuFile operations.

Args:
descr (intptr_t): ``CUfileDescr_t`` file descriptor (OS
agnostic).
descr (intptr_t): ``CUfileDescr_t`` file descriptor (OS agnostic).

Returns:
intptr_t: ``CUfileHandle_t`` opaque file handle for IO
operations.
intptr_t: ``CUfileHandle_t`` opaque file handle for IO operations.

.. seealso:: `cuFileHandleRegister`
"""
Expand Down Expand Up @@ -3046,8 +3044,8 @@ cpdef buf_register(intptr_t buf_ptr_base, size_t length, int flags):

Args:
buf_ptr_base (intptr_t): buffer pointer allocated.
length (size_t): size of memory region from the above
specified bufPtr.
length (size_t): size of memory region from the above specified
bufPtr.
flags (int): CU_FILE_RDMA_REGISTER.

.. seealso:: `cuFileBufRegister`
Expand Down Expand Up @@ -3107,10 +3105,9 @@ cpdef driver_set_poll_mode(bint poll, size_t poll_threshold_size):
"""Sets whether the Read/Write APIs use polling to do IO operations This takes place before the driver is opened. No-op if driver is already open.

Args:
poll (bint): boolean to indicate whether to use poll mode or
not.
poll_threshold_size (size_t): max IO size to use for POLLING
mode in KB.
poll (bint): boolean to indicate whether to use poll mode or not.
poll_threshold_size (size_t): max IO size to use for POLLING mode
in KB.

.. seealso:: `cuFileDriverSetPollMode`
"""
Expand All @@ -3123,8 +3120,7 @@ cpdef driver_set_max_direct_io_size(size_t max_direct_io_size):
"""Control parameter to set max IO size(KB) used by the library to talk to nvidia-fs driver This takes place before the driver is opened. No-op if driver is already open.

Args:
max_direct_io_size (size_t): maximum allowed direct io size in
KB.
max_direct_io_size (size_t): maximum allowed direct io size in KB.

.. seealso:: `cuFileDriverSetMaxDirectIOSize`
"""
Expand All @@ -3137,8 +3133,8 @@ cpdef driver_set_max_cache_size(size_t max_cache_size):
"""Control parameter to set maximum GPU memory reserved per device by the library for internal buffering This takes place before the driver is opened. No-op if driver is already open.

Args:
max_cache_size (size_t): The maximum GPU buffer space per
device used for internal use in KB.
max_cache_size (size_t): The maximum GPU buffer space per device
used for internal use in KB.

.. seealso:: `cuFileDriverSetMaxCacheSize`
"""
Expand All @@ -3151,8 +3147,8 @@ cpdef driver_set_max_pinned_mem_size(size_t max_pinned_size):
"""Sets maximum buffer space that is pinned in KB for use by ``cuFileBufRegister`` This takes place before the driver is opened. No-op if driver is already open.

Args:
max_pinned_size (size_t): maximum buffer space that is pinned
in KB.
max_pinned_size (size_t): maximum buffer space that is pinned in
KB.

.. seealso:: `cuFileDriverSetMaxPinnedMemSize`
"""
Expand Down Expand Up @@ -3283,7 +3279,6 @@ cpdef tuple get_parameter_min_max_value(int param):

Returns:
A 2-tuple containing:

- size_t: Pointer to store the minimum value.
- size_t: Pointer to store the maximum value.

Expand Down Expand Up @@ -3360,8 +3355,8 @@ cpdef get_stats_l1(intptr_t stats):
"""Get Level 1 cuFile statistics.

Args:
stats (intptr_t): Pointer to ``CUfileStatsLevel1_t`` structure
to be filled.
stats (intptr_t): Pointer to ``CUfileStatsLevel1_t`` structure to
be filled.

.. seealso:: `cuFileGetStatsL1`
"""
Expand All @@ -3374,8 +3369,8 @@ cpdef get_stats_l2(intptr_t stats):
"""Get Level 2 cuFile statistics.

Args:
stats (intptr_t): Pointer to ``CUfileStatsLevel2_t`` structure
to be filled.
stats (intptr_t): Pointer to ``CUfileStatsLevel2_t`` structure to
be filled.

.. seealso:: `cuFileGetStatsL2`
"""
Expand All @@ -3388,8 +3383,8 @@ cpdef get_stats_l3(intptr_t stats):
"""Get Level 3 cuFile statistics.

Args:
stats (intptr_t): Pointer to ``CUfileStatsLevel3_t`` structure
to be filled.
stats (intptr_t): Pointer to ``CUfileStatsLevel3_t`` structure to
be filled.

.. seealso:: `cuFileGetStatsL3`
"""
Expand Down Expand Up @@ -3427,8 +3422,7 @@ cpdef get_parameter_posix_pool_slab_array(intptr_t size_values, intptr_t count_v
Args:
size_values (intptr_t): Buffer to receive slab sizes in KB.
count_values (intptr_t): Buffer to receive slab counts.
len (int): Buffer size (must match the actual parameter
length).
len (int): Buffer size (must match the actual parameter length).

.. seealso:: `cuFileGetParameterPosixPoolSlabArray`
"""
Expand Down
22 changes: 11 additions & 11 deletions cuda_bindings/cuda/bindings/cydriver.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# SPDX-License-Identifier: Apache-2.0
#
# This code was automatically generated across versions from 12.9.0 to 13.3.0. Do not modify it directly.
# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=bb890a59df1f24c75b658b283d480647d1201feb4e6b644edd4742022b7fbf8c
# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=aa0375d2eb9e51178d31031d7883f198aa600935022ea82ac5190b2a0c3cc2ea


# <<<< PREAMBLE CONTENT >>>>
Expand Down Expand Up @@ -1948,13 +1948,13 @@ cdef extern from 'cuda.h':
char bytes[16]
ctypedef CUuuid_st CUuuid

cdef extern from 'cuda.h':
ctypedef struct CUstreamMemOpFlushRemoteWritesParams_st 'CUstreamMemOpFlushRemoteWritesParams_st':
cdef extern from 'cuda.h' namespace "CUstreamBatchMemOpParams_v1":
ctypedef struct CUstreamMemOpFlushRemoteWritesParams_st 'CUstreamBatchMemOpParams_v1::CUstreamMemOpFlushRemoteWritesParams_st':
CUstreamBatchMemOpType operation
unsigned int flags

cdef extern from 'cuda.h':
ctypedef struct CUstreamMemOpMemoryBarrierParams_st 'CUstreamMemOpMemoryBarrierParams_st':
cdef extern from 'cuda.h' namespace "CUstreamBatchMemOpParams_v1":
ctypedef struct CUstreamMemOpMemoryBarrierParams_st 'CUstreamBatchMemOpParams_v1::CUstreamMemOpMemoryBarrierParams_st':
CUstreamBatchMemOpType operation
unsigned int flags

Expand Down Expand Up @@ -2441,26 +2441,26 @@ cdef extern from 'cuda.h':
CUgraph* phGraph_out
CUcontext ctx

cdef extern from 'cuda.h':
ctypedef struct CUstreamMemOpWaitValueParams_st 'CUstreamMemOpWaitValueParams_st':
cdef extern from 'cuda.h' namespace "CUstreamBatchMemOpParams_v1":
ctypedef struct CUstreamMemOpWaitValueParams_st 'CUstreamBatchMemOpParams_v1::CUstreamMemOpWaitValueParams_st':
CUstreamBatchMemOpType operation
CUdeviceptr address
cuuint32_t value
cuuint64_t value64
unsigned int flags
CUdeviceptr alias

cdef extern from 'cuda.h':
ctypedef struct CUstreamMemOpWriteValueParams_st 'CUstreamMemOpWriteValueParams_st':
cdef extern from 'cuda.h' namespace "CUstreamBatchMemOpParams_v1":
ctypedef struct CUstreamMemOpWriteValueParams_st 'CUstreamBatchMemOpParams_v1::CUstreamMemOpWriteValueParams_st':
CUstreamBatchMemOpType operation
CUdeviceptr address
cuuint32_t value
cuuint64_t value64
unsigned int flags
CUdeviceptr alias

cdef extern from 'cuda.h':
ctypedef struct CUstreamMemOpAtomicReductionParams_st 'CUstreamMemOpAtomicReductionParams_st':
cdef extern from 'cuda.h' namespace "CUstreamBatchMemOpParams_v1":
ctypedef struct CUstreamMemOpAtomicReductionParams_st 'CUstreamBatchMemOpParams_v1::CUstreamMemOpAtomicReductionParams_st':
CUstreamBatchMemOpType operation
unsigned int flags
CUstreamAtomicReductionOpType reductionOp
Expand Down
32 changes: 15 additions & 17 deletions cuda_bindings/cuda/bindings/nvfatbin.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# SPDX-License-Identifier: Apache-2.0
#
# This code was automatically generated across versions from 12.4.1 to 13.3.0. Do not modify it directly.
# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=464151e9be344b663eb001d24b780328f477470afca263a03384394a057b74bd
# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=0d7db39224d376ca4c7d93b2716af3f1cec1e519d8155f50e9317f11724619d1


# <<<< PREAMBLE CONTENT >>>>
Expand Down Expand Up @@ -149,14 +149,13 @@ cpdef intptr_t create(options, size_t options_count) except -1:
"""nvFatbinCreate creates a new handle.

Args:
options (object): An array of strings, each containing a
single option. It can be:
options (object): An array of strings, each containing a single
option. It can be:

- an :class:`int` as the pointer address to the nested sequence, or
- a Python sequence of :class:`int`\s, each of which is a pointer address
to a valid sequence of 'char', or
- a nested Python sequence of ``str``.

options_count (size_t): Number of options.

Returns:
Expand All @@ -180,8 +179,8 @@ cpdef add_ptx(intptr_t handle, code, size_t size, arch, identifier, options_cmd_
handle (intptr_t): nvFatbin handle.
code (bytes): The PTX code.
size (size_t): The size of the PTX code.
arch (str): The numerical architecture that this PTX is for
(the XX of any sm_XX, lto_XX, or compute_XX).
arch (str): The numerical architecture that this PTX is for (the
XX of any sm_XX, lto_XX, or compute_XX).
identifier (str): Name of the PTX, useful when extracting the
fatbin with tools like cuobjdump.
options_cmd_line (str): Options used during JIT compilation.
Expand Down Expand Up @@ -213,10 +212,10 @@ cpdef add_cubin(intptr_t handle, code, size_t size, arch, identifier):
handle (intptr_t): nvFatbin handle.
code (bytes): The cubin.
size (size_t): The size of the cubin.
arch (str): The numerical architecture that this cubin is for
(the XX of any sm_XX, lto_XX, or compute_XX).
identifier (str): Name of the cubin, useful when extracting
the fatbin with tools like cuobjdump.
arch (str): The numerical architecture that this cubin is for (the
XX of any sm_XX, lto_XX, or compute_XX).
identifier (str): Name of the cubin, useful when extracting the
fatbin with tools like cuobjdump.

.. seealso:: `nvFatbinAddCubin`
"""
Expand All @@ -241,10 +240,10 @@ cpdef add_ltoir(intptr_t handle, code, size_t size, arch, identifier, options_cm
handle (intptr_t): nvFatbin handle.
code (bytes): The LTOIR code.
size (size_t): The size of the LTOIR code.
arch (str): The numerical architecture that this LTOIR is for
(the XX of any sm_XX, lto_XX, or compute_XX).
identifier (str): Name of the LTOIR, useful when extracting
the fatbin with tools like cuobjdump.
arch (str): The numerical architecture that this LTOIR is for (the
XX of any sm_XX, lto_XX, or compute_XX).
identifier (str): Name of the LTOIR, useful when extracting the
fatbin with tools like cuobjdump.
options_cmd_line (str): Options used during JIT compilation.

.. seealso:: `nvFatbinAddLTOIR`
Expand Down Expand Up @@ -305,7 +304,6 @@ cpdef tuple version():

Returns:
A 2-tuple containing:

- unsigned int: The major version.
- unsigned int: The minor version.

Expand Down Expand Up @@ -353,8 +351,8 @@ cpdef add_tile_ir(intptr_t handle, code, size_t size, identifier, options_cmd_li
handle (intptr_t): nvFatbin handle.
code (bytes): The Tile IR.
size (size_t): The size of the Tile IR.
identifier (str): Name of the Tile IR, useful when extracting
the fatbin with tools like cuobjdump.
identifier (str): Name of the Tile IR, useful when extracting the
fatbin with tools like cuobjdump.
options_cmd_line (str): Options used during JIT compilation.

.. seealso:: `nvFatbinAddTileIR`
Expand Down
Loading
Loading