Skip to content

Commit f45e8ec

Browse files
author
cuda-python-bot
committed
Deploy doc preview for PR 1615 (199c142)
1 parent 7d37159 commit f45e8ec

137 files changed

Lines changed: 544 additions & 1139 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Sphinx build info version 1
22
# This file records the configuration used when building these files. When it is not found, a full rebuild will be done.
3-
config: 78cc71c889043bc890697eac6ba8b2ff
3+
config: 2c861610dfa971fbcb8efc6273b255bc
44
tags: 645f666f9bcd5a90fca523b33c5a78b7

docs/pr-preview/pr-1615/cuda-core/latest/_sources/api.rst.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,18 @@ CUDA runtime
4949
LaunchConfig
5050
VirtualMemoryResourceOptions
5151

52+
.. data:: LEGACY_DEFAULT_STREAM
53+
54+
The legacy default CUDA stream. All devices share the same legacy default
55+
stream, and work launched on it is not concurrent with work on any other
56+
stream.
57+
58+
.. data:: PER_THREAD_DEFAULT_STREAM
59+
60+
The per-thread default CUDA stream. Each host thread has its own per-thread
61+
default stream, and work launched on it can execute concurrently with work
62+
on other non-blocking streams.
63+
5264

5365
CUDA compilation toolchain
5466
--------------------------

docs/pr-preview/pr-1615/cuda-core/latest/_sources/generated/cuda.core.Graph.rst.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,9 @@ cuda.core.Graph
2424

2525

2626

27+
.. rubric:: Attributes
28+
29+
30+
.. autoproperty:: handle
31+
2732

docs/pr-preview/pr-1615/cuda-core/latest/_sources/interoperability.rst.txt

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.. SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
1+
.. SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
22
.. SPDX-License-Identifier: Apache-2.0
33
44
.. currentmodule:: cuda.core
@@ -79,6 +79,16 @@ array libraries.
7979
The :attr:`~utils.StridedMemoryView.is_device_accessible` attribute can be used to check
8080
whether or not the underlying buffer can be accessed on GPU.
8181

82+
The :class:`~utils.StridedMemoryView` class supports narrow data types (e.g., ``bfloat16``) when the optional
83+
`ml_dtypes <https://github.com/jax-ml/ml_dtypes>`_ package is installed. This enables interoperability with libraries that use
84+
narrow dtype tensors, such as PyTorch with ``torch.bfloat16`` or CuPy with ``"bfloat16"`` dtype.
85+
If ``ml_dtypes`` is not available and such a tensor is encountered, a
86+
:obj:`NotImplementedError` will be raised.
87+
88+
Currently supported narrow data types:
89+
90+
* ``bfloat16``
91+
8292
.. rubric:: Footnotes
8393

8494
.. [1] https://numba.readthedocs.io/en/stable/cuda/cuda_array_interface.html
Lines changed: 64 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,84 @@
1-
.. SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
1+
.. SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
22
.. SPDX-License-Identifier: Apache-2.0
33
44
.. currentmodule:: cuda.core
55

66
``cuda.core`` 0.6.0 Release Notes
77
==================================
88

9+
10+
Highlights
11+
----------
12+
13+
- Added the ``cuda.core.system`` module for NVML-based system and device queries.
14+
- Several :class:`~utils.StridedMemoryView` improvements, including bfloat16 dlpack support
15+
and numpy array interoperability.
16+
- Improved support for Python object protocols across core API classes.
17+
- Performance improvements through Cythonization and reduced Python overhead.
18+
19+
20+
Breaking Changes
21+
----------------
22+
23+
- Building ``cuda.core`` from source now requires ``cuda-bindings`` >= 12.9.0, due to Cython-level
24+
dependencies on the NVVM bindings (``cynvvm``). Pre-built wheels are unaffected. The previous
25+
minimum was 12.8.0.
26+
27+
928
New features
1029
------------
1130

12-
- Added public access to default CUDA streams via module-level constants ``LEGACY_DEFAULT_STREAM`` and ``PER_THREAD_DEFAULT_STREAM``
31+
- Added the ``cuda.core.system`` module for NVML-based system and device queries, including
32+
device attributes, clocks, temperatures, fans, events, and PCI information.
1333

14-
Users can now access default streams directly from the ``cuda.core`` namespace:
34+
- :class:`~utils.StridedMemoryView` improvements:
1535

16-
.. code-block:: python
36+
- Added ``from_array_interface`` constructor for creating views from numpy arrays.
37+
- Improved structured dtype array support.
38+
- Added bfloat16 dlpack support when the optional ``ml_dtypes`` package is installed.
1739

18-
from cuda.core import LEGACY_DEFAULT_STREAM, PER_THREAD_DEFAULT_STREAM
40+
- Added public access to default CUDA streams via module-level constants
41+
``LEGACY_DEFAULT_STREAM`` and ``PER_THREAD_DEFAULT_STREAM``, replacing the previous
42+
workaround of using ``Stream.from_handle(0)``.
1943

20-
# Use legacy default stream (synchronizes with all blocking streams)
21-
LEGACY_DEFAULT_STREAM.sync()
44+
- Added :meth:`Kernel.from_handle` for wrapping an existing ``CUfunction`` handle into a
45+
:class:`Kernel` object, enabling interoperability with foreign CUDA handles.
2246

23-
# Use per-thread default stream (non-blocking, thread-local)
24-
PER_THREAD_DEFAULT_STREAM.sync()
47+
- Added ``__eq__``, ``__hash__``, ``__weakref__``, and ``__repr__`` support for core API classes
48+
including :class:`Buffer`, :class:`LaunchConfig`, :class:`Kernel`, :class:`ObjectCode`,
49+
:class:`Stream`, and :class:`Event`.
2550

26-
The legacy default stream synchronizes with all blocking streams in the same CUDA context, ensuring strict ordering but potentially limiting concurrency. The per-thread default stream is local to the calling thread and does not synchronize with other streams, enabling concurrent execution in multi-threaded applications.
51+
- Added NVVM ``extra_sources`` and ``use_libdevice`` options to :class:`ProgramOptions` for
52+
multi-module NVVM compilation and automatic libdevice loading.
53+
54+
- Added CUDA version compatibility check at import time to detect mismatches between
55+
``cuda.core`` and the installed ``cuda-bindings`` version.
2756

28-
This replaces the previous undocumented workaround of using ``Stream.from_handle(0)`` to access the legacy default stream.
2957

3058
Fixes and enhancements
31-
-----------------------
59+
----------------------
60+
61+
- Eliminated spurious CUDA driver errors during interpreter shutdown by ensuring
62+
resources are destroyed in the correct order.
63+
64+
- Fixed a bug preventing weak references to core API objects.
65+
66+
- Fixed zero-sized allocations in legacy memory resources, which previously failed on
67+
certain platforms.
68+
69+
- Improved performance by Cythonizing :class:`Program` and :class:`ObjectCode` internals.
70+
71+
- Reduced :class:`~utils.StridedMemoryView` construction overhead.
72+
73+
- ``__hash__`` and ``__eq__`` on core API classes no longer require a CUDA context.
74+
75+
- Device attribute queries now gracefully handle unsupported attributes on older CUDA
76+
drivers, returning sensible defaults instead of raising errors.
77+
78+
- Added a warning when :class:`ManagedMemoryResource` is created on platforms without
79+
concurrent managed access support.
80+
81+
- Reduced wheel and installed package sizes by excluding Cython source files and build
82+
artifacts from distribution packages.
3283

33-
None.
84+
- Slightly improved typing support.

docs/pr-preview/pr-1615/cuda-core/latest/_sources/release/0.6.x-notes.rst.txt

Lines changed: 0 additions & 42 deletions
This file was deleted.

docs/pr-preview/pr-1615/cuda-core/latest/_static/documentation_options.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const DOCUMENTATION_OPTIONS = {
2-
VERSION: '0.5.1.dev146',
2+
VERSION: '0.6.1.dev35',
33
LANGUAGE: 'en',
44
COLLAPSE_INDEX: false,
55
BUILDER: 'html',

docs/pr-preview/pr-1615/cuda-core/latest/api.html

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444

4545

4646

47-
<script src="_static/documentation_options.js?v=01ee675b"></script>
47+
<script src="_static/documentation_options.js?v=117c49e1"></script>
4848
<script src="_static/doctools.js?v=9bcbadda"></script>
4949
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
5050
<script src="_static/clipboard.min.js?v=a7894cd8"></script>
@@ -53,7 +53,7 @@
5353
<script>
5454
DOCUMENTATION_OPTIONS.theme_version = '0.16.1';
5555
DOCUMENTATION_OPTIONS.theme_switcher_json_url = 'https://nvidia.github.io/cuda-python/cuda-core/nv-versions.json';
56-
DOCUMENTATION_OPTIONS.theme_switcher_version_match = '0.5.1.dev146';
56+
DOCUMENTATION_OPTIONS.theme_switcher_version_match = '0.6.1.dev35';
5757
DOCUMENTATION_OPTIONS.show_version_warning_banner =
5858
false;
5959
</script>
@@ -722,6 +722,22 @@ <h2>CUDA runtime<a class="headerlink" href="#cuda-runtime" title="Link to this h
722722
</tbody>
723723
</table>
724724
</div>
725+
<dl class="py data">
726+
<dt class="sig sig-object py" id="cuda.core.LEGACY_DEFAULT_STREAM">
727+
<span class="sig-prename descclassname"><span class="pre">cuda.core.</span></span><span class="sig-name descname"><span class="pre">LEGACY_DEFAULT_STREAM</span></span><a class="headerlink" href="#cuda.core.LEGACY_DEFAULT_STREAM" title="Link to this definition">#</a></dt>
728+
<dd><p>The legacy default CUDA stream. All devices share the same legacy default
729+
stream, and work launched on it is not concurrent with work on any other
730+
stream.</p>
731+
</dd></dl>
732+
733+
<dl class="py data">
734+
<dt class="sig sig-object py" id="cuda.core.PER_THREAD_DEFAULT_STREAM">
735+
<span class="sig-prename descclassname"><span class="pre">cuda.core.</span></span><span class="sig-name descname"><span class="pre">PER_THREAD_DEFAULT_STREAM</span></span><a class="headerlink" href="#cuda.core.PER_THREAD_DEFAULT_STREAM" title="Link to this definition">#</a></dt>
736+
<dd><p>The per-thread default CUDA stream. Each host thread has its own per-thread
737+
default stream, and work launched on it can execute concurrently with work
738+
on other non-blocking streams.</p>
739+
</dd></dl>
740+
725741
</section>
726742
<section id="cuda-compilation-toolchain">
727743
<h2>CUDA compilation toolchain<a class="headerlink" href="#cuda-compilation-toolchain" title="Link to this heading">#</a></h2>
@@ -987,7 +1003,11 @@ <h2>CUDA system information and NVIDIA Management Library (NVML)<a class="header
9871003
</div>
9881004
<nav class="bd-toc-nav page-toc" aria-labelledby="pst-page-navigation-heading-2">
9891005
<ul class="visible nav section-nav flex-column">
990-
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#cuda-runtime">CUDA runtime</a></li>
1006+
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#cuda-runtime">CUDA runtime</a><ul class="visible nav section-nav flex-column">
1007+
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#cuda.core.LEGACY_DEFAULT_STREAM"><code class="docutils literal notranslate"><span class="pre">LEGACY_DEFAULT_STREAM</span></code></a></li>
1008+
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#cuda.core.PER_THREAD_DEFAULT_STREAM"><code class="docutils literal notranslate"><span class="pre">PER_THREAD_DEFAULT_STREAM</span></code></a></li>
1009+
</ul>
1010+
</li>
9911011
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#cuda-compilation-toolchain">CUDA compilation toolchain</a></li>
9921012
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#cuda-system-information-and-nvidia-management-library-nvml">CUDA system information and NVIDIA Management Library (NVML)</a></li>
9931013
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#utility-functions">Utility functions</a></li>

docs/pr-preview/pr-1615/cuda-core/latest/api_private.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444

4545

4646

47-
<script src="_static/documentation_options.js?v=01ee675b"></script>
47+
<script src="_static/documentation_options.js?v=117c49e1"></script>
4848
<script src="_static/doctools.js?v=9bcbadda"></script>
4949
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
5050
<script src="_static/clipboard.min.js?v=a7894cd8"></script>
@@ -53,7 +53,7 @@
5353
<script>
5454
DOCUMENTATION_OPTIONS.theme_version = '0.16.1';
5555
DOCUMENTATION_OPTIONS.theme_switcher_json_url = 'https://nvidia.github.io/cuda-python/cuda-core/nv-versions.json';
56-
DOCUMENTATION_OPTIONS.theme_switcher_version_match = '0.5.1.dev146';
56+
DOCUMENTATION_OPTIONS.theme_switcher_version_match = '0.6.1.dev35';
5757
DOCUMENTATION_OPTIONS.show_version_warning_banner =
5858
false;
5959
</script>

docs/pr-preview/pr-1615/cuda-core/latest/conduct.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444

4545

4646

47-
<script src="_static/documentation_options.js?v=01ee675b"></script>
47+
<script src="_static/documentation_options.js?v=117c49e1"></script>
4848
<script src="_static/doctools.js?v=9bcbadda"></script>
4949
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
5050
<script src="_static/clipboard.min.js?v=a7894cd8"></script>
@@ -53,7 +53,7 @@
5353
<script>
5454
DOCUMENTATION_OPTIONS.theme_version = '0.16.1';
5555
DOCUMENTATION_OPTIONS.theme_switcher_json_url = 'https://nvidia.github.io/cuda-python/cuda-core/nv-versions.json';
56-
DOCUMENTATION_OPTIONS.theme_switcher_version_match = '0.5.1.dev146';
56+
DOCUMENTATION_OPTIONS.theme_switcher_version_match = '0.6.1.dev35';
5757
DOCUMENTATION_OPTIONS.show_version_warning_banner =
5858
false;
5959
</script>

0 commit comments

Comments
 (0)