diff --git a/cuda_bindings/cuda/bindings/_v2/nvrtc.pyx b/cuda_bindings/cuda/bindings/_v2/nvrtc.pyx index 9cc508aeef6..5348a0cea94 100644 --- a/cuda_bindings/cuda/bindings/_v2/nvrtc.pyx +++ b/cuda_bindings/cuda/bindings/_v2/nvrtc.pyx @@ -3,7 +3,7 @@ # SPDX-License-Identifier: Apache-2.0 # # This code was automatically generated across versions from 12.9.0 to 13.4.1. Do not modify it directly. -# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=3b41a6e66b9064266d04521a6cc9b9a4f715c453d21323ab9741f9e34e6f2d80 +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=27a65e25f2ddca0b89c0e3017c34f26b42c64fc9b221475ab0b8198207d44647 # <<<< PREAMBLE CONTENT >>>> @@ -657,6 +657,8 @@ 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. @@ -672,6 +674,8 @@ 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. @@ -881,6 +885,9 @@ 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. @@ -925,6 +932,9 @@ 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 @@ -961,6 +971,10 @@ 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. @@ -974,6 +988,20 @@ 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. diff --git a/cuda_bindings/docs/source/release/13.5.0-notes.rst b/cuda_bindings/docs/source/release/13.5.0-notes.rst new file mode 100644 index 00000000000..b449e5e3cab --- /dev/null +++ b/cuda_bindings/docs/source/release/13.5.0-notes.rst @@ -0,0 +1,27 @@ +.. SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +.. SPDX-License-Identifier: Apache-2.0 + +.. module:: cuda.bindings + +``cuda-bindings`` 13.5.0 Release notes +====================================== + + +Enhancements +------------ + +- ``cuda-bindings`` docstrings now include the full documentation from the upstream CTK, not just the first paragraph. + +Preview feature +--------------- + +A new version of the ``nvrtc`` API is available as ``cuda.bindings._v2.nvrtc``. The +primary improvements are: (1) raising exceptions rather than returning error +codes, (2) uses PEP8-compliant naming, and (3) more performance. This API is +still experimental and subject to change. + +Known issues +------------ + +* Updating from older versions (v12.6.2.post1 and below) via ``pip install -U cuda-python`` might not work. Please do a clean re-installation by uninstalling ``pip uninstall -y cuda-python`` followed by installing ``pip install cuda-python``. +* ``nvml.system_get_process_name`` on WSL can return incorrect values. To work around this, set the locale to "C" before calling ``nvml.device_get_compute_running_processes_v3`` (which sets the process names) and before calling ``nvml.system_get_process_name``. ``cuda_core`` does this automatically, but users of the raw NVML API will need to do this manually.