-
Notifications
You must be signed in to change notification settings - Fork 199
Convert all markdown files in docs/source/ directories to reST #897
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
leofang
merged 13 commits into
main
from
copilot/fix-f1061348-68ac-4b30-8d2e-db769dfb6f85
Aug 25, 2025
+1,641
−1,369
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
f054974
Initial plan
Copilot 41320c3
Phase 1: Use git mv to rename 38 markdown files to .rst preserving gi…
Copilot 1c0eeeb
Phase 2: Convert markdown syntax to ReST syntax in all 38 files
Copilot 547eea2
Phase 3: Update toctree references from .md to .rst
Copilot f386286
Phase 4: Add pre-commit hook to prevent new markdown files in docs/so…
Copilot c1c0474
Phase 5: Fix MyST syntax issues and validate conversion
Copilot 2a3b6f3
Fix SPDX headers: Add missing copyright and license identifiers to co…
Copilot d576dda
Fix reStructuredText issues: correct cross-refs, links, and code blocks
Copilot ec127a4
Fix code block consistency and Python comments in documentation
Copilot 7af7edb
Fix reStructuredText syntax errors: correct toctree directive, broken…
Copilot 6e99356
Fix release.rst toctree titles and improve pre-commit hook message
Copilot 051cb1a
Fix reStructuredText rendering issues: hyperlinks, code block introdu…
Copilot a6ec69e
manual edit to fix rendering errors and prune outdated files
leofang File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,16 @@ | ||
# Code of Conduct | ||
.. SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE | ||
|
||
## Overview | ||
Code of Conduct | ||
=============== | ||
|
||
Define the code of conduct followed and enforced for the `cuda.core` project. | ||
Overview | ||
-------- | ||
|
||
## Our Pledge | ||
Define the code of conduct followed and enforced for the ``cuda.bindings`` project. | ||
|
||
Our Pledge | ||
---------- | ||
|
||
In the interest of fostering an open and welcoming environment, we as | ||
contributors and maintainers pledge to making participation in our project and | ||
|
@@ -13,7 +19,8 @@ size, disability, ethnicity, sex characteristics, gender identity and expression | |
level of experience, education, socio-economic status, nationality, personal | ||
appearance, race, religion, or sexual identity and orientation. | ||
|
||
## Our Standards | ||
Our Standards | ||
------------- | ||
|
||
Examples of behavior that contributes to creating a positive environment | ||
include: | ||
|
@@ -35,7 +42,8 @@ Examples of unacceptable behavior by participants include: | |
* Other conduct which could reasonably be considered inappropriate in a | ||
professional setting | ||
|
||
## Our Responsibilities | ||
Our Responsibilities | ||
-------------------- | ||
|
||
Project maintainers are responsible for clarifying the standards of acceptable | ||
behavior and are expected to take appropriate and fair corrective action in | ||
|
@@ -47,7 +55,8 @@ that are not aligned to this Code of Conduct, or to ban temporarily or | |
permanently any contributor for other behaviors that they deem inappropriate, | ||
threatening, offensive, or harmful. | ||
|
||
## Scope | ||
Scope | ||
----- | ||
|
||
This Code of Conduct applies both within project spaces and in public spaces | ||
when an individual is representing the project or its community. Examples of | ||
|
@@ -56,11 +65,12 @@ address, posting via an official social media account, or acting as an appointed | |
representative at an online or offline event. Representation of a project may be | ||
further defined and clarified by project maintainers. | ||
|
||
## Enforcement | ||
Enforcement | ||
----------- | ||
|
||
Instances of abusive, harassing, or otherwise unacceptable behavior may be | ||
reported by contacting the project team at | ||
[[email protected]](mailto:[email protected]) All | ||
`[email protected] <mailto:[email protected]>`_ All | ||
complaints will be reviewed and investigated and will result in a response that | ||
is deemed necessary and appropriate to the circumstances. The project team is | ||
obligated to maintain confidentiality with regard to the reporter of an | ||
|
@@ -71,12 +81,11 @@ Project maintainers who do not follow or enforce the Code of Conduct in good | |
faith may face temporary or permanent repercussions as determined by other | ||
members of the project's leadership. | ||
|
||
## Attribution | ||
Attribution | ||
----------- | ||
|
||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, | ||
This Code of Conduct is adapted from the `Contributor Covenant <https://www.contributor-covenant.org>`_, version 1.4, | ||
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html | ||
|
||
[homepage]: https://www.contributor-covenant.org | ||
|
||
For answers to common questions about this code of conduct, see | ||
https://www.contributor-covenant.org/faq |
This file was deleted.
Oops, something went wrong.
leofang marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
.. SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE | ||
|
||
Contributing | ||
============ | ||
|
||
Thank you for your interest in contributing to ``cuda-bindings``! Based on the type of contribution, it will fall into two categories: | ||
|
||
1. You want to report a bug, feature request, or documentation issue | ||
- File an `issue <https://github.com/NVIDIA/cuda-python/issues/new/choose>`_ describing what you encountered or what you want to see changed. | ||
- The NVIDIA team will evaluate the issues and triage them, scheduling | ||
them for a release. If you believe the issue needs priority attention | ||
comment on the issue to notify the team. | ||
2. You want to implement a feature, improvement, or bug fix: | ||
- At this time we do not accept code contributions. |
This file was deleted.
Oops, something went wrong.
leofang marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
.. SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE | ||
|
||
Environment Variables | ||
===================== | ||
|
||
Runtime Environment Variables | ||
----------------------------- | ||
|
||
- ``CUDA_PYTHON_CUDA_PER_THREAD_DEFAULT_STREAM`` : When set to 1, the default stream is the per-thread default stream. When set to 0, the default stream is the legacy default stream. This defaults to 0, for the legacy default stream. See `Stream Synchronization Behavior <https://docs.nvidia.com/cuda/cuda-runtime-api/stream-sync-behavior.html>`_ for an explanation of the legacy and per-thread default streams. | ||
|
||
|
||
Build-Time Environment Variables | ||
-------------------------------- | ||
|
||
- ``CUDA_HOME`` or ``CUDA_PATH``: Specifies the location of the CUDA Toolkit. | ||
|
||
- ``CUDA_PYTHON_PARSER_CACHING`` : bool, toggles the caching of parsed header files during the cuda-bindings build process. If caching is enabled (``CUDA_PYTHON_PARSER_CACHING`` is True), the cache path is set to ./cache_<library_name>, where <library_name> is derived from the cuda toolkit libraries used to build cuda-bindings. | ||
|
||
- ``CUDA_PYTHON_PARALLEL_LEVEL`` (previously ``PARALLEL_LEVEL``) : int, sets the number of threads used in the compilation of extension modules. Not setting it or setting it to 0 would disable parallel builds. | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
leofang marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
.. SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
.. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE | ||
|
||
Installation | ||
============ | ||
|
||
Runtime Requirements | ||
-------------------- | ||
|
||
``cuda.bindings`` supports the same platforms as CUDA. Runtime dependencies are: | ||
|
||
* Linux (x86-64, arm64) and Windows (x86-64) | ||
* Python 3.9 - 3.13 | ||
* Driver: Linux (580.65.06 or later) Windows (580.88 or later) | ||
* Optionally, NVRTC, nvJitLink, NVVM, and cuFile from CUDA Toolkit 13.x | ||
|
||
.. note:: | ||
|
||
The optional CUDA Toolkit components are now installed via the ``cuda-toolkit`` metapackage from PyPI for improved dependency resolution. Components can also be installed via Conda, OS-specific package managers, or local installers (as described in the CUDA Toolkit `Windows <https://docs.nvidia.com/cuda/cuda-installation-guide-microsoft-windows/index.html>`_ and `Linux <https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html>`_ Installation Guides). | ||
|
||
Starting from v12.8.0, ``cuda-python`` becomes a meta package which currently depends only on ``cuda-bindings``; in the future more sub-packages will be added to ``cuda-python``. In the instructions below, we still use ``cuda-python`` as example to serve existing users, but everything is applicable to ``cuda-bindings`` as well. | ||
|
||
Installing from PyPI | ||
-------------------- | ||
|
||
.. code-block:: console | ||
|
||
$ pip install -U cuda-python | ||
|
||
Install all optional dependencies with: | ||
|
||
.. code-block:: console | ||
|
||
$ pip install -U cuda-python[all] | ||
|
||
Where the optional dependencies include: | ||
|
||
* ``nvidia-cuda-nvrtc`` (NVRTC runtime compilation library) | ||
* ``nvidia-nvjitlink`` (nvJitLink library) | ||
* ``nvidia-nvvm`` (NVVM library) | ||
* ``nvidia-cufile`` (cuFile library, Linux only) | ||
|
||
These are now installed through the ``cuda-toolkit`` metapackage for improved dependency resolution. | ||
|
||
Installing from Conda | ||
--------------------- | ||
|
||
.. code-block:: console | ||
|
||
$ conda install -c conda-forge cuda-python | ||
|
||
.. note:: | ||
|
||
When using conda, the ``cuda-version`` metapackage can be used to control the versions of CUDA Toolkit components that are installed to the conda environment. | ||
|
||
For example: | ||
|
||
.. code-block:: console | ||
|
||
$ conda install -c conda-forge cuda-python cuda-version=13 | ||
|
||
Installing from Source | ||
---------------------- | ||
|
||
Requirements | ||
^^^^^^^^^^^^ | ||
|
||
* CUDA Toolkit headers[^1] | ||
* CUDA Runtime static library[^2] | ||
|
||
[^1]: User projects that ``cimport`` CUDA symbols in Cython must also use CUDA Toolkit (CTK) types as provided by the ``cuda.bindings`` major.minor version. This results in CTK headers becoming a transitive dependency of downstream projects through CUDA Python. | ||
|
||
[^2]: The CUDA Runtime static library (``libcudart_static.a`` on Linux, ``cudart_static.lib`` on Windows) is part of the CUDA Toolkit. If using conda packages, it is contained in the ``cuda-cudart-static`` package. | ||
|
||
Source builds require that the provided CUDA headers are of the same major.minor version as the ``cuda.bindings`` you're trying to build. Despite this requirement, note that the minor version compatibility is still maintained. Use the ``CUDA_HOME`` (or ``CUDA_PATH``) environment variable to specify the location of your headers. For example, if your headers are located in ``/usr/local/cuda/include``, then you should set ``CUDA_HOME`` with: | ||
|
||
.. code-block:: console | ||
|
||
$ export CUDA_HOME=/usr/local/cuda | ||
|
||
See `Environment Variables <environment_variables.rst>`_ for a description of other build-time environment variables. | ||
|
||
.. note:: | ||
|
||
Only ``cydriver``, ``cyruntime`` and ``cynvrtc`` are impacted by the header requirement. | ||
|
||
Editable Install | ||
^^^^^^^^^^^^^^^^ | ||
|
||
You can use: | ||
|
||
.. code-block:: console | ||
|
||
$ pip install -v -e . | ||
|
||
to install the module as editable in your current Python environment (e.g. for testing of porting other libraries to use the binding). |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This won't work in windows due to the use of
bash
as an entrypoint. Should we make this platform agnostic?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This question got me to try
pre-commit run --all-files
on Windows, which I had never done before.I see a few
mypy
errors.Which makes me think we're not usually running
pre-commit
on Windows anywhere, so spending an effort here might not be worth the trouble?For completeness only:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a very interesting question. It's actually not possible to be able to run
git
on Windows but does not havebash
available. The official Git installer for Windows (https://git-scm.com/downloads/win) is supported by the "Git for Windows" project (https://gitforwindows.org), which installs "Git Bash" as part of the installation. Sobash
will be always available.Even if it's not, we'd still want to limit this hook to Linux-only in some way (that I cannot find), since
git bash
always existsThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, it seems as I was looking into a solution and preparing my reply, Ralf also found the same issue