-
Notifications
You must be signed in to change notification settings - Fork 315
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
Changes from 9 commits
f054974
41320c3
1c0eeeb
547eea2
f386286
c1c0474
2a3b6f3
d576dda
ec127a4
7af7edb
6e99356
051cb1a
a6ec69e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -30,6 +30,14 @@ 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 | ||
| args: ['if find . -path "*/docs/source/*.md" -not -path "./docs/README.md" | grep -q .; then echo "ERROR: Markdown files found in docs/source/ directories. Use reStructuredText (.rst) instead."; exit 1; fi'] | ||
| language: system | ||
| pass_filenames: false | ||
| always_run: true | ||
|
Comment on lines
+34
to
+40
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This won't work in windows due to the use of
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This question got me to try I see a few Which makes me think we're not usually running For completeness only:
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 Even if it's not, we'd still want to limit this hook to Linux-only in some way (that I cannot find), since
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
|
|
||
| - repo: https://github.com/PyCQA/bandit | ||
| rev: 2d0b675b04c80ae42277e10500db06a0a37bae17 # frozen: 1.8.6 | ||
|
|
||
|
leofang marked this conversation as resolved.
|
This file was deleted.
|
leofang marked this conversation as resolved.
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| .. SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| .. SPDX-License-Identifier: LicenseRef-NVIDIA-SOFTWARE-LICENSE | ||
|
|
||
| Environment Variables | ||
| ===================== | ||
|
|
||
| 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. | ||
|
|
||
| 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. |
This file was deleted.
|
leofang marked this conversation as resolved.
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,94 @@ | ||
| .. 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 | ||
|
leofang marked this conversation as resolved.
|
||
|
|
||
| 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). | ||
Uh oh!
There was an error while loading. Please reload this page.