Skip to content

Commit 8eb9dc2

Browse files
Andy-Jostleofang
andauthored
[doc-only] docs(core): finalize 1.1.0 release notes (#2315)
* docs(core): finalize 1.1.0 release notes Add a Highlights section, backfill PR/issue links on New features entries, and add Bug fixes entries for the v1.1.0 IPC import hardening (#2219, #2223, #2224), the ManagedBuffer.accessed_by torn-state fix (#2222), and graph node attachment lifetimes (#2280). Highlights (per review): the .pyi type-stub support and the new cuda.core.texture module; NVLink enumeration is covered in New features / Bug fixes rather than as a highlight. Also adds a New features entry for the cuda.core.texture module (#467, #2095, #2307). * Reorder API refs + ensure each section has currentmodule the compilation toolchain is one of the unique selling points of cuda.core, but we are burying it deeply --------- Co-authored-by: Leo Fang <leof@nvidia.com>
1 parent 95907d9 commit 8eb9dc2

2 files changed

Lines changed: 150 additions & 44 deletions

File tree

cuda_core/docs/source/api.rst

Lines changed: 49 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,45 @@ Memory management
7878
VirtualMemoryResourceOptions
7979

8080

81+
CUDA compilation toolchain
82+
--------------------------
83+
84+
.. currentmodule:: cuda.core
85+
86+
.. autosummary::
87+
:toctree: generated/
88+
89+
:template: autosummary/cyclass.rst
90+
91+
Program
92+
Linker
93+
ObjectCode
94+
Kernel
95+
96+
:template: dataclass.rst
97+
98+
ProgramOptions
99+
LinkerOptions
100+
101+
Program caches
102+
``````````````
103+
104+
``Program.compile`` accepts a ``cache=`` keyword argument that integrates
105+
with any :class:`~cuda.core.utils.ProgramCacheResource`, so callers can
106+
avoid recompiling identical source + options + target without writing the
107+
:func:`~cuda.core.utils.make_program_cache_key` lookup by hand.
108+
109+
.. currentmodule:: cuda.core.utils
110+
111+
.. autosummary::
112+
:toctree: generated/
113+
114+
ProgramCacheResource
115+
InMemoryProgramCache
116+
FileStreamProgramCache
117+
make_program_cache_key
118+
119+
81120
CUDA graphs
82121
-----------
83122

@@ -89,6 +128,8 @@ CPU overhead. Graphs can be constructed in two ways:
89128
edges. Both produce an executable :class:`~graph.Graph` that can be
90129
launched on a :class:`Stream`.
91130

131+
.. currentmodule:: cuda.core
132+
92133
.. autosummary::
93134
:toctree: generated/
94135

@@ -138,6 +179,8 @@ Each subclass exposes attributes unique to its operation type.
138179
Graphics interoperability
139180
-------------------------
140181

182+
.. currentmodule:: cuda.core
183+
141184
.. autosummary::
142185
:toctree: generated/
143186

@@ -149,6 +192,8 @@ Graphics interoperability
149192
Tensor Memory Accelerator (TMA)
150193
-------------------------------
151194

195+
.. currentmodule:: cuda.core
196+
152197
.. autosummary::
153198
:toctree: generated/
154199

@@ -208,47 +253,6 @@ The associated enumerations —
208253
alongside the other ``cuda.core`` enumerations.
209254

210255

211-
CUDA compilation toolchain
212-
--------------------------
213-
214-
.. currentmodule:: cuda.core
215-
216-
.. autosummary::
217-
:toctree: generated/
218-
219-
:template: autosummary/cyclass.rst
220-
221-
Program
222-
Linker
223-
ObjectCode
224-
Kernel
225-
226-
:template: dataclass.rst
227-
228-
ProgramOptions
229-
LinkerOptions
230-
231-
Program caches
232-
``````````````
233-
234-
``Program.compile`` accepts a ``cache=`` keyword argument that integrates
235-
with any :class:`~cuda.core.utils.ProgramCacheResource`, so callers can
236-
avoid recompiling identical source + options + target without writing the
237-
:func:`~cuda.core.utils.make_program_cache_key` lookup by hand.
238-
239-
.. currentmodule:: cuda.core.utils
240-
241-
.. autosummary::
242-
:toctree: generated/
243-
244-
ProgramCacheResource
245-
InMemoryProgramCache
246-
FileStreamProgramCache
247-
make_program_cache_key
248-
249-
.. currentmodule:: cuda.core
250-
251-
252256
CUDA process checkpointing
253257
--------------------------
254258

@@ -303,6 +307,8 @@ Use ``Process.restore_thread_id`` to discover that thread before calling
303307
persistence mode to be enabled or ``cuInit`` to have been called before
304308
execution.
305309

310+
.. currentmodule:: cuda.core
311+
306312
.. autosummary::
307313
:toctree: generated/
308314

@@ -314,6 +320,8 @@ execution.
314320
Utility functions
315321
-----------------
316322

323+
.. currentmodule:: cuda.core
324+
317325
.. autosummary::
318326
:toctree: generated/
319327

cuda_core/docs/source/release/1.1.0-notes.rst

Lines changed: 101 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,33 @@
77
=================================
88

99

10+
Highlights
11+
----------
12+
13+
- ``cuda.core`` now ships with ``.pyi`` type stubs for all public APIs,
14+
giving IDEs and type checkers full autocompletion and static analysis.
15+
- New :mod:`cuda.core.texture` module for texture and surface memory:
16+
:class:`~texture.OpaqueArray`, :class:`~texture.MipmappedArray`,
17+
:class:`~texture.TextureObject`, and :class:`~texture.SurfaceObject`,
18+
constructed through the corresponding ``Device.create_*`` factories.
19+
- Richer managed-memory support: the new :class:`ManagedBuffer` exposes a
20+
property-style advice API (:attr:`~ManagedBuffer.read_mostly`,
21+
:attr:`~ManagedBuffer.preferred_location`,
22+
:attr:`~ManagedBuffer.accessed_by`) with NUMA-aware host locations via the
23+
new :class:`Host` type, plus batched range operations in
24+
:mod:`cuda.core.utils` for prefetching and discarding many buffers at once.
25+
- CUDA 13.3 toolkit support.
26+
(`#2139 <https://github.com/NVIDIA/cuda-python/pull/2139>`__)
27+
28+
1029
New features
1130
------------
1231

1332
- Added :class:`Host` as the symmetric counterpart of :class:`Device` for
1433
expressing managed-memory locations: ``Host()`` (any host),
1534
``Host(numa_id=N)`` (specific NUMA node), and ``Host.numa_current()``
1635
(calling thread's NUMA node).
36+
(`#1775 <https://github.com/NVIDIA/cuda-python/pull/1775>`__)
1737

1838
- Added :class:`ManagedBuffer`, a :class:`Buffer` subclass returned by
1939
:meth:`ManagedMemoryResource.allocate` that exposes a property-style
@@ -30,13 +50,16 @@ New features
3050

3151
Use :meth:`ManagedBuffer.from_handle` to wrap an existing managed-memory
3252
pointer.
53+
(`#1775 <https://github.com/NVIDIA/cuda-python/pull/1775>`__)
3354

3455
- Added batched managed-memory range operations to :mod:`cuda.core.utils`
3556
(CUDA 13+): :func:`~utils.prefetch_batch`, :func:`~utils.discard_batch`,
3657
and :func:`~utils.discard_prefetch_batch`. Each takes a sequence of
3758
managed :class:`Buffer` instances and dispatches to the corresponding
3859
``cuMem*BatchAsync`` driver entry point, addressing the managed-memory
39-
portion of #1333. Single-buffer operations are exposed as instance
60+
portion of
61+
`#1333 <https://github.com/NVIDIA/cuda-python/issues/1333>`__. Single-buffer
62+
operations are exposed as instance
4063
methods on :class:`ManagedBuffer` (:meth:`~ManagedBuffer.prefetch`,
4164
:meth:`~ManagedBuffer.discard`, :meth:`~ManagedBuffer.discard_prefetch`)
4265
and as property setters (:attr:`~ManagedBuffer.read_mostly`,
@@ -48,28 +71,103 @@ New features
4871
:meth:`system.Device.get_nvlinks` for device-specific NVLink enumeration.
4972
These APIs avoid relying on the static NVML ``NVML_NVLINK_MAX_LINKS`` macro
5073
when querying the links available on a particular device.
74+
(`#2192 <https://github.com/NVIDIA/cuda-python/pull/2192>`__)
5175

5276
- Added the :attr:`graph.GraphBuilder.graph_definition` property, which
5377
exposes a captured graph as an explicit :class:`graph.GraphDefinition`
5478
view sharing ownership of the same underlying graph. This enables hybrid
5579
flows that mix the capture and explicit graph-building APIs, such as
5680
inspecting or augmenting a captured graph, or populating a conditional
5781
body entirely through the explicit API.
82+
(`#2026 <https://github.com/NVIDIA/cuda-python/pull/2026>`__)
83+
84+
- Added the :mod:`cuda.core.texture` module for texture and surface memory:
85+
:class:`~texture.OpaqueArray` and :class:`~texture.MipmappedArray` for
86+
hardware-laid-out array allocations, and :class:`~texture.TextureObject` and
87+
:class:`~texture.SurfaceObject` for bindless kernel-side sampled reads and
88+
typed load/store. Objects are constructed from a
89+
:class:`~texture.ResourceDescriptor` via
90+
:meth:`Device.create_opaque_array`, :meth:`Device.create_mipmapped_array`,
91+
:meth:`Device.create_texture_object`, and :meth:`Device.create_surface_object`.
92+
(`#467 <https://github.com/NVIDIA/cuda-python/issues/467>`__,
93+
`#2095 <https://github.com/NVIDIA/cuda-python/pull/2095>`__,
94+
`#2307 <https://github.com/NVIDIA/cuda-python/pull/2307>`__)
5895

5996
- ``cuda.core`` now ships with ``.pyi`` stubs for all public APIs, enabling
6097
users' IDEs and type checkers to provide better autocompletion and static
6198
analysis.
99+
(`#2061 <https://github.com/NVIDIA/cuda-python/pull/2061>`__)
100+
101+
- :class:`ObjectCode` and :class:`Program` now accept path-like inputs in
102+
addition to strings and bytes.
103+
(`#2123 <https://github.com/NVIDIA/cuda-python/pull/2123>`__)
104+
105+
- Exposed a :attr:`Buffer.size` accessor to Python.
106+
(`#2068 <https://github.com/NVIDIA/cuda-python/pull/2068>`__,
107+
closes `#2049 <https://github.com/NVIDIA/cuda-python/issues/2049>`__)
62108

63-
Bug fixes
64-
---------
109+
Fixes and enhancements
110+
----------------------
65111

66112
- On WSL, ``cuda.core.system.get_process_name`` would raise a
67113
``UnicodeDecodeError``. It should now return the correct result.
114+
(`#2118 <https://github.com/NVIDIA/cuda-python/pull/2118>`__)
68115
- Calling ``cuda.core.system.get_process_name`` before querying any device's
69116
``compute_running_processes`` would raise a ``NvmlNotFoundError``. Now it will
70117
correctly return the process name, if it is a GPU-using process.
71118
- :meth:`system.Device.get_nvlink` now validates link numbers against the
72119
device-specific NVLink count and raises ``ValueError`` for unsupported links.
120+
(`#2192 <https://github.com/NVIDIA/cuda-python/pull/2192>`__)
121+
- Hardened the IPC buffer import path against malformed or untrusted peer
122+
descriptors: descriptor payloads shorter than the driver struct are now
123+
rejected before import
124+
(`#2223 <https://github.com/NVIDIA/cuda-python/pull/2223>`__), an imported
125+
buffer's size is validated against the mapped allocation extent before any
126+
copy (`#2224 <https://github.com/NVIDIA/cuda-python/pull/2224>`__), and
127+
negative allocation handles are always rejected, including under ``-O``
128+
(`#2219 <https://github.com/NVIDIA/cuda-python/pull/2219>`__).
129+
- :attr:`ManagedBuffer.accessed_by` now validates every location before
130+
issuing any advice, so a bulk assignment containing an invalid entry can no
131+
longer leave the applied advice in a torn state.
132+
(`#2222 <https://github.com/NVIDIA/cuda-python/pull/2222>`__)
133+
- Graph nodes now keep their Python-owned attachments (kernel-argument
134+
buffers, host-callback functions and user data, and memcpy/memset operands)
135+
alive for the lifetime of the graph. Previously, keeping these objects alive
136+
was the caller's responsibility.
137+
(`#2280 <https://github.com/NVIDIA/cuda-python/pull/2280>`__)
138+
- Hardened the graph user-object destructor against races during Python
139+
interpreter shutdown.
140+
(`#2074 <https://github.com/NVIDIA/cuda-python/pull/2074>`__)
141+
- Free-threading correctness fixes: buffer and memory-resource threading
142+
(`#2162 <https://github.com/NVIDIA/cuda-python/pull/2162>`__), critical-section
143+
guards on shared accessors
144+
(`#2215 <https://github.com/NVIDIA/cuda-python/pull/2215>`__), and an atomic
145+
flag guarding buffer memory-attribute initialization
146+
(`#2216 <https://github.com/NVIDIA/cuda-python/pull/2216>`__).
147+
- :meth:`Program.compile` cache keys are now FIPS-safe.
148+
(`#2087 <https://github.com/NVIDIA/cuda-python/pull/2087>`__)
149+
- Memory-pool driver errors are now preserved instead of being masked by
150+
out-of-memory handling.
151+
(`#2084 <https://github.com/NVIDIA/cuda-python/pull/2084>`__)
152+
- DLPack export now raises ``BufferError`` (the intended exception) instead of
153+
``RuntimeError`` when a buffer cannot be exported.
154+
(`#2160 <https://github.com/NVIDIA/cuda-python/pull/2160>`__)
155+
- Corrected the :class:`Buffer` and :class:`MemoryResource` ``__eq__``
156+
implementations.
157+
(`#2067 <https://github.com/NVIDIA/cuda-python/pull/2067>`__,
158+
closes `#2050 <https://github.com/NVIDIA/cuda-python/issues/2050>`__)
159+
- Checkpoint restore now validates GPU UUID inputs early.
160+
(`#2086 <https://github.com/NVIDIA/cuda-python/pull/2086>`__)
161+
- Bumped the PyTorch tensor-bridge upper bound to 2.12.
162+
(`#2099 <https://github.com/NVIDIA/cuda-python/pull/2099>`__)
163+
164+
Documentation
165+
-------------
166+
167+
- Documented the IPC buffer pickle trust boundary: :meth:`Buffer.__reduce__`
168+
and multi-process IPC users should review the security note before
169+
unpickling buffer handles from untrusted sources.
170+
(`#2225 <https://github.com/NVIDIA/cuda-python/pull/2225>`__)
73171

74172
Deprecated APIs
75173
---------------

0 commit comments

Comments
 (0)