Skip to content
Merged
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
10 changes: 9 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ repos:
language: python
additional_dependencies:
- https://files.pythonhosted.org/packages/cc/20/ff623b09d963f88bfde16306a54e12ee5ea43e9b597108672ff3a408aad6/pathspec-0.12.1-py3-none-any.whl

- id: no-markdown-in-docs-source
name: Prevent markdown files in docs/source directories
entry: bash -c
Expand All @@ -39,6 +39,14 @@ repos:
pass_filenames: false
always_run: true

# Checking for common mistakes
- repo: https://github.com/pre-commit/pygrep-hooks
rev: "v1.10.0"
hooks:
- id: rst-backticks
- id: rst-directive-colons
- id: rst-inline-touching-normal

- repo: https://github.com/PyCQA/bandit
rev: 2d0b675b04c80ae42277e10500db06a0a37bae17 # frozen: 1.8.6
hooks:
Expand Down
4 changes: 2 additions & 2 deletions cuda_core/DESCRIPTION.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ cuda-core: Pythonic access to CUDA core functionalities
* `Examples <https://github.com/NVIDIA/cuda-python/tree/main/cuda_core/examples>`_
* `Issue tracker <https://github.com/NVIDIA/cuda-python/issues/>`_

`cuda.core` is currently under active development. Any feedbacks or suggestions are welcomed!
``cuda.core`` is currently under active development. Feedback and suggestions are welcome!


Installation
Expand All @@ -22,4 +22,4 @@ Installation

pip install cuda-core[cu12]

Please refer to the `installation instructions <https://nvidia.github.io/cuda-python/cuda-core/latest/install.html>`_ for different ways of installing `cuda.core`, including building from source.
Please refer to the `installation instructions <https://nvidia.github.io/cuda-python/cuda-core/latest/install.html>`_ for different ways of installing ``cuda.core``, including building from source.
2 changes: 1 addition & 1 deletion cuda_core/docs/source/interoperability.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ exposing their own stream types.
To address this issue, we propose the :attr:`~_stream.IsStreamT.__cuda_stream__` protocol
(currently version 0) as follows: For any Python objects that are meant to be interpreted
as a stream, they should add a ``__cuda_stream__`` *method* that returns a 2-tuple: The
version number (``0``) and the address of ``cudaStream_t`` (both as Python `int`):
version number (``0``) and the address of ``cudaStream_t`` (both as Python ``int``):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmmm... interesting that this is not linking to the docs for Python int anymore, alright let's fix it this way


.. code-block:: python

Expand Down
2 changes: 1 addition & 1 deletion cuda_core/docs/source/release/0.1.0-notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ Limitations

- All APIs are currently *experimental* and subject to change without deprecation notice.
Please kindly share your feedback with us so that we can make ``cuda.core`` better!
- Source code release only; `pip`/`conda` support is coming in a future release
- Source code release only; ``pip``/``conda`` support is coming in a future release
- Windows TCC mode is `not yet supported <https://github.com/NVIDIA/cuda-python/issues/206>`_
4 changes: 2 additions & 2 deletions cuda_core/docs/source/release/0.1.1-notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ Limitations

- All APIs are currently *experimental* and subject to change without deprecation notice.
Please kindly share your feedback with us so that we can make ``cuda.core`` better!
- Using ``cuda.core`` with NVRTC or nvJitLink installed from PyPI via `pip install` is currently
- Using ``cuda.core`` with NVRTC or nvJitLink installed from PyPI via ``pip install`` is currently
not supported. This will be fixed in a future release.
- Some :class:`~LinkerOptions` are only available when using a modern version of CUDA. When using CUDA <12,
the backend is the cuLink API which supports only a subset of the options that nvjitlink does.
Further, some options aren't available on CUDA versions <12.6.
- To use ``cuda.core`` with Python 3.13, it currently requires building ``cuda-python`` from source
prior to `pip install`. This extra step will be fixed soon.
prior to ``pip install``. This extra step will be fixed soon.
2 changes: 1 addition & 1 deletion cuda_core/docs/source/release/0.3.0-notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ New features

- :class:`~_module.Kernel` adds :attr:`~_module.Kernel.num_arguments` and :attr:`~_module.Kernel.arguments_info` for introspection of kernel arguments. (#612)
- Add pythonic access to kernel occupancy calculation functions via :attr:`Kernel.occupancy`. (#648)
- Support launching cooperative kernels by setting :attr:`LaunchConfig.cooperative_launch` to `True`.
- Support launching cooperative kernels by setting :attr:`LaunchConfig.cooperative_launch` to ``True``.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

- A name can be assigned to :class:`ObjectCode` instances generated by both :class:`Program` and :class:`Linker` through their respective options.
- Expose :class:`Buffer`, :class:`DeviceMemoryResource`, :class:`LegacyPinnedMemoryResource`, and :class:`MemoryResource` to the top namespace.
- Before this release, the internal :class:`Buffer` class had an ``__init__()`` constructor. To align with the design of cuda.core objects,
Expand Down
2 changes: 1 addition & 1 deletion cuda_core/docs/source/release/0.X.Y-notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Breaking Changes
----------------

- **LaunchConfig grid parameter interpretation**: When :attr:`LaunchConfig.cluster` is specified, the :attr:`LaunchConfig.grid` parameter now correctly represents the number of clusters instead of blocks. Previously, the grid parameter was incorrectly interpreted as blocks, causing a mismatch with the expected C++ behavior. This change ensures that ``LaunchConfig(grid=4, cluster=2, block=32)`` correctly produces 4 clusters × 2 blocks/cluster = 8 total blocks, matching the C++ equivalent ``cudax::make_hierarchy(cudax::grid_dims(4), cudax::cluster_dims(2), cudax::block_dims(32))``.
- When :class:`Buffer` is closed, :attr:`Buffer.handle` is now set to `None`. It was previously set to ``0`` by accident.
- When :class:`Buffer` is closed, :attr:`Buffer.handle` is now set to ``None``. It was previously set to ``0`` by accident.


New features
Expand Down
10 changes: 5 additions & 5 deletions cuda_python/DESCRIPTION.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,22 @@ CUDA Python is the home for accessing NVIDIA's CUDA platform from Python. It con
* `cuda.core <https://nvidia.github.io/cuda-python/cuda-core/latest>`_: Pythonic access to CUDA Runtime and other core functionalities
* `cuda.bindings <https://nvidia.github.io/cuda-python/cuda-bindings/latest>`_: Low-level Python bindings to CUDA C APIs
* `cuda.cooperative <https://nvidia.github.io/cccl/python/cooperative>`_: A Python package providing CCCL's reusable block-wide and warp-wide *device* primitives for use within Numba CUDA kernels
* `cuda.parallel <https://nvidia.github.io/cccl/python/parallel>`_: A Python package for easy access to CCCL's highly efficient and customizable parallel algorithms, like `sort`, `scan`, `reduce`, `transform`, etc, that are callable on the *host*
* `cuda.parallel <https://nvidia.github.io/cccl/python/parallel>`_: A Python package for easy access to CCCL's highly efficient and customizable parallel algorithms, like ``sort``, ``scan``, ``reduce``, ``transform``, etc, that are callable on the *host*
* `numba.cuda <https://nvidia.github.io/numba-cuda/>`_: Numba's target for CUDA GPU programming by directly compiling a restricted subset of Python code into CUDA kernels and device functions following the CUDA execution model.

For access to NVIDIA CPU & GPU Math Libraries, please refer to `nvmath-python <https://docs.nvidia.com/cuda/nvmath-python/latest>`_.

CUDA Python is currently undergoing an overhaul to improve existing and bring up new components. All of the previously available functionalities from the `cuda-python` package will continue to be available, please refer to the `cuda.bindings <https://nvidia.github.io/cuda-python/cuda-bindings/latest>`_ documentation for installation guide and further detail.
CUDA Python is currently undergoing an overhaul to improve existing and bring up new components. All of the previously available functionalities from the ``cuda-python`` package will continue to be available, please refer to the `cuda.bindings <https://nvidia.github.io/cuda-python/cuda-bindings/latest>`_ documentation for installation guide and further detail.

cuda-python as a metapackage
============================

`cuda-python` is now a metapackage that contains a collection of subpackages. Each subpackage is versioned independently, allowing installation of each component as needed.
``cuda-python`` is now a metapackage that contains a collection of subpackages. Each subpackage is versioned independently, allowing installation of each component as needed.

Subpackage: cuda.core
---------------------

The `cuda.core` package offers idiomatic, pythonic access to CUDA Runtime and other functionalities.
The ``cuda.core`` package offers idiomatic, pythonic access to CUDA Runtime and other functionalities.

The goals are to

Expand All @@ -38,7 +38,7 @@ The goals are to
Subpackage: cuda.bindings
-------------------------

The `cuda.bindings` package is a standard set of low-level interfaces, providing full coverage of and access to the CUDA host APIs from Python.
The ``cuda.bindings`` package is a standard set of low-level interfaces, providing full coverage of and access to the CUDA host APIs from Python.

The list of available interfaces are:

Expand Down