99Highlights
1010----------
1111
12+ - ``cuda.core `` now requires ``cuda-bindings `` 12.9.8 or newer for CUDA 12, and 13.5.0 or newer
13+ for CUDA 13. With an older ``cuda-bindings ``, ``import cuda.core `` fails with a message that
14+ names the required version. ``pip install 'cuda-core[cu12]' `` or ``pip install 'cuda-core[cu13]' ``
15+ installs a compatible version. See the :ref: `support policy <cuda-core-bindings-floor >`.
16+ (`#2783 <https://github.com/NVIDIA/cuda-python/issues/2783 >`__)
17+
1218- Support for Python 3.10 is dropped (end of life).
1319
14- Breaking Changes
15- ----------------
16-
17- - ``cuda.core `` now requires a minimum ``cuda-bindings `` version per CUDA major, at build and run
18- time: 12.9.8 for CUDA 12 and 13.5.0 for CUDA 13. See the
19- :ref: `support policy <cuda-core-bindings-floor >`. ``import cuda.core `` with an older
20- ``cuda-bindings `` fails with a message that names the required version and how to install it.
21- ``pip install cuda-core[cu12] `` or ``pip install cuda-core[cu13] `` installs a compatible
22- version. Supported CUDA drivers and CUDA Toolkit libraries are unchanged. Previously
23- ``cuda.core `` accepted any ``cuda-bindings `` of the right major, and an older one produced import
24- errors for missing C functions, silently disabled features, or crashes.
25- (https://github.com/NVIDIA/cuda-python/issues/2783)
26-
27- - A source build of ``cuda.core `` must use a ``cuda.h `` of the same major.minor as its
28- ``cuda-bindings ``. If they differ, the build fails early.
29- (https://github.com/NVIDIA/cuda-python/issues/2783)
30-
31- - With the ``cuda-bindings `` floor in place, whether a feature is available now depends only on
32- the CUDA driver and the ``cuda.core `` build's CUDA major. The checks that also inspected the
33- ``cuda-bindings `` version are gone, and so are their error messages. Error messages that name a
34- minimum now name a driver version. ``cuda.core.system `` always uses NVML through
35- ``cuda-bindings ``, so ``cuda.core.system.CUDA_BINDINGS_NVML_IS_COMPATIBLE `` is always ``True ``.
36- :mod: `cuda.core.checkpoint ` requires the CUDA 13 build of ``cuda.core `` and now says so. That
37- requirement was already in effect, because the CUDA 12 ``cuda-bindings `` lack a type it uses.
38- (https://github.com/NVIDIA/cuda-python/issues/2783)
39-
40- - The C++ layer calls the driver through the entry points ``cuda-bindings `` resolves rather than
41- through its Cython wrappers. As a result, a driver function that the installed driver lacks can
42- no longer surface as ``SystemError `` from a C++ call.
43- (https://github.com/NVIDIA/cuda-python/issues/2783)
20+ - :class: `VirtualMemoryResource ` buffers can be shared with other processes through POSIX file
21+ descriptors or fabric handles.
22+
23+ - :func: `host_launch ` enqueues a Python callable or a compiled host function on a stream in
24+ stream order.
25+
26+ - A new :doc: `error handling <../error_handling >` policy: :class: `CUDAWarning ` reports CUDA
27+ errors that cannot be raised, and :class: `CUDAOutOfMemoryError ` is a :class: `MemoryError `.
4428
4529New features
4630------------
@@ -72,8 +56,23 @@ New features
7256 linker. :meth: `Linker.link ` also accepts ``"ltoir" `` on nvJitLink 13.3 or
7357 newer so incremental LTO chains can retain IR until their final link. Direct
7458 PTX and CUBIN inputs are rejected for this target because they carry no LTOIR
75- and nvJitLink would otherwise silently omit them.
76- (`#2369 <https://github.com/NVIDIA/cuda-python/issues/2369 >`__)
59+ and nvJitLink would otherwise silently omit them. On nvJitLink versions
60+ older than 13.6, incremental links with link-time optimization disable the
61+ nvJitLink intermediate cache, which crashed after repeated links on Windows.
62+ (`#2369 <https://github.com/NVIDIA/cuda-python/issues/2369 >`__,
63+ `#3038 <https://github.com/NVIDIA/cuda-python/issues/3038 >`__)
64+
65+ - Added the ``priority `` option to :class: `LaunchConfig `, which sets the
66+ execution priority of a kernel launch. Lower numbers are higher priorities.
67+ The valid range is the device's stream priority range, as for
68+ :attr: `StreamOptions.priority `. A nonzero value outside it raises
69+ ``ValueError ``. The default, ``0 ``, leaves the stream's priority in effect.
70+ (`#2631 <https://github.com/NVIDIA/cuda-python/issues/2631 >`__)
71+
72+ - Added the ``cluster_scheduling_policy_preference `` option to
73+ :class: `LaunchConfig `: ``"DEFAULT" ``, ``"SPREAD" ``, or
74+ ``"LOAD_BALANCING" ``. It requires compute capability 9.0 or newer.
75+ (`#2629 <https://github.com/NVIDIA/cuda-python/issues/2629 >`__)
7776
7877- Added the read-only :attr: `ManagedBuffer.last_prefetch_location ` property,
7978 which reports the destination requested by the most recent explicit
@@ -160,6 +159,12 @@ New features
160159Fixes and enhancements
161160----------------------
162161
162+ - :meth: `utils.StridedMemoryView.from_dlpack ` and
163+ :meth: `utils.StridedMemoryView.from_array_interface ` use the stable C API of
164+ PyTorch 2.14 and newer for PyTorch tensors, and no longer cap the supported
165+ PyTorch version. PyTorch 2.3 to 2.13 keep the previous path.
166+ (`#3033 <https://github.com/NVIDIA/cuda-python/pull/3033 >`__)
167+
163168- Kernels can read and write :class: `PinnedMemoryResource ` buffers. The driver
164169 makes a host memory pool accessible only from the host by default, so a
165170 kernel that touched such a buffer failed with ``CUDA_ERROR_ILLEGAL_ADDRESS ``.
@@ -296,8 +301,8 @@ Fixes and enhancements
296301
297302- When a :class: `Device ` method has to run in the device's context and the
298303 caller's context cannot be restored afterwards, the created resource is
299- destroyed and the raised ``CUDAError `` now carries a note (Python 3.11+;
300- appended to the message on 3.10) stating that the caller's context could not
304+ destroyed and the raised ``CUDAError `` now carries a note
305+ stating that the caller's context could not
301306 be restored and which context is current. Previously the error named only
302307 the driver status of the failed ``cuCtxSetCurrent `` call. If the call itself
303308 failed as well, its error is raised and the restoration failure is the note.
@@ -315,8 +320,7 @@ Fixes and enhancements
315320 context is current, returning ``None ``.
316321
317322- A failed rollback of a partially embedded child graph node is now attached
318- as a note to the exception that triggered the rollback (reported as
319- :class: `CUDAWarning ` on Python 3.10), and a failed ``cuStreamEndCapture ``
323+ as a note to the exception that triggered the rollback, and a failed ``cuStreamEndCapture ``
320324 made when a still-building :class: `~graph.GraphBuilder ` is garbage collected
321325 is now reported as :class: `CUDAWarning `; both were silent.
322326
@@ -447,6 +451,30 @@ Fixes and enhancements
447451 cuda.core error, please report".
448452 (`#3202 <https://github.com/NVIDIA/cuda-python/issues/3202 >`__)
449453
454+ - A process that made a device current with :meth: `Device.set_current ` no
455+ longer crashes at interpreter shutdown. The primary context was released
456+ from a thread-local destructor after Python had finalized.
457+ (`#2743 <https://github.com/NVIDIA/cuda-python/issues/2743 >`__)
458+
459+ - :meth: `Buffer.from_ipc_descriptor ` no longer deadlocks when two threads
460+ import IPC buffers at the same time.
461+ (`#2840 <https://github.com/NVIDIA/cuda-python/issues/2840 >`__)
462+
463+ - :class: `Linker ` passes boolean nvJitLink options as ``1 `` or ``0 ``.
464+ Newer nvJitLink versions reject the ``true `` and ``false `` values that it
465+ passed before.
466+ (`#3254 <https://github.com/NVIDIA/cuda-python/issues/3254 >`__)
467+
468+ - :class: `Program ` with ``code_type="nvvm" `` now raises :class: `CUDAError `
469+ for twelve :class: `ProgramOptions ` fields that libNVVM cannot use, such as
470+ ``pch `` and ``no_cache ``. Before, they were silently ignored.
471+ (`#2954 <https://github.com/NVIDIA/cuda-python/issues/2954 >`__,
472+ `#3289 <https://github.com/NVIDIA/cuda-python/pull/3289 >`__)
473+
474+ - A new graph no longer adopts the metadata of a destroyed graph when the
475+ driver reuses its handle address. Cleanup of the old graph could
476+ invalidate the new one.
477+
450478Deprecations
451479------------
452480
@@ -456,3 +484,14 @@ Deprecations
456484
457485 - ``TimeoutError `` is now ``NvmlTimeoutError ``.
458486 - ``MemoryError `` is now ``NvmlMemoryError ``.
487+
488+ Known issues
489+ ------------
490+
491+ - :class: `PinnedMemoryResource ` rejects ``HOST_NUMA `` pools on CUDA 12.6 to
492+ 12.8 drivers, although the driver supports them. This is a regression in 1.2.0.
493+ (`#2795 <https://github.com/NVIDIA/cuda-python/issues/2795 >`__)
494+
495+ - :meth: `SMResource.split ` with ``dry_run=True `` raises when a group requests a nonzero SM
496+ count, with a CUDA 13 build on a driver of 13.1 or newer.
497+ (`#2765 <https://github.com/NVIDIA/cuda-python/issues/2765 >`__)
0 commit comments