Skip to content

Commit 8a464b4

Browse files
rwgkleofang
andauthored
Add a new "What goes into ctk-next?" section in qa/README.md (NVIDIA#162)
* Add qa/what_goes_into_ctk-next.md * Replace bs4.BeautifulSoup with stdlib html.parser.HTMLParser * Small tweaks in qa/what_goes_into_ctk-next.md * Fix oversight: <img src="ctk-next.drawio.svg" width="600"> * Minor update to qa/ctk-next.drawio.svg * <img src="ctk-next.drawio.svg" width="400"> * helpers/download_from_kitpicks.py: save files with kitpick001 suffix (not kitpicks001) * Merge what_goes_into_ctk-next.md into README.md for simplicity. * Add some prose to the "What goes into `ctk-next`?" section. * cuda-python-private::cython-gen Co-authored-by: Leo Fang <[email protected]> * cybind -vvv Co-authored-by: Leo Fang <[email protected]> * Reword first sentence of cybind section. Co-authored-by: Leo Fang <[email protected]> * Add `--output-dir ../ctk-next/cuda_bindings` to cybind command. * Rename "toolshed / pathfinder" subsection → "Manual updates" * Make download_from_kitpicks.py more versatile * Remove stray colon (correct: cuda-python-private:cython-gen) --------- Co-authored-by: Leo Fang <[email protected]>
1 parent d534461 commit 8a464b4

4 files changed

Lines changed: 79 additions & 2 deletions

File tree

‎.gitattributes‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ cuda/_version.py export-subst
88
*.hpp binary
99
# git should not convert line endings in PNG files
1010
*.png binary
11+
*.svg binary

‎.spdx-ignore‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,5 @@ cuda_bindings/examples/*
1111

1212
# Vendored
1313
cuda_core/cuda/core/experimental/include/dlpack.h
14+
15+
qa/ctk-next.drawio.svg

‎qa/README.md‎

Lines changed: 72 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,76 @@ This directory **does not exist in the public `main` branch**.
2828

2929
---
3030

31+
## What goes into `ctk-next`?
32+
33+
"Kitpicks" are CTK release candidates, sometimes referred to as, e.g., "13.1 RC 027". They are hosted here:
34+
35+
[**https://cuda-repo.nvidia.com/release-candidates/kitpicks/cuda-r13-1/13.1.0/**](
36+
https://cuda-repo.nvidia.com/release-candidates/kitpicks/cuda-r13-1/13.1.0/)
37+
38+
A helper script is available for downloading `linux-64`, `linux-aarch64`, and `win-64` release candidates, e.g.:
39+
40+
`qa/helpers/download_from_kitpicks.py https://cuda-repo.nvidia.com/release-candidates/kitpicks/cuda-r13-1/13.1.0/027/local_installers/`
41+
42+
<img src="ctk-next.drawio.svg" width="400">
43+
44+
### cython-gen
45+
46+
The [`cuda-python-private:cython-gen`](https://github.com/NVIDIA/cuda-python-private/tree/cython-gen) branch contains
47+
custom auto-generation scripts and configuration files for generating `driver`, `runtime`, and `nvrtc` bindings.
48+
It includes scripts for:
49+
50+
* Fetching and processing CUDA headers.
51+
* Generating documentation configurations.
52+
* Creating Python bindings for CUDA driver, runtime, and NVRTC code.
53+
54+
To invoke the top-level script:
55+
```
56+
CUDA_HOME=/usr/local/cuda-13.1 python regenerate.py -o ../ctk-next
57+
```
58+
59+
### cybind
60+
61+
All other library bindings provided by `cuda-bindings` are supported by [`cybind`](https://gitlab-master.nvidia.com/leof/cybind/).
62+
After setting up the environment (see cybind documentation), the `cuda-python` bindings can be generated with:
63+
64+
```
65+
CUDA_PATH=/usr/local/cuda-13.1 python -m cybind -vvv --generate cufile nvjitlink nvvm --output-dir ../ctk-next/cuda_bindings
66+
```
67+
68+
### Manual updates
69+
70+
#### cuda-pathfinder `supported_*.py`
71+
72+
These cuda-pathfinder files may need to be updated:
73+
74+
* `cuda/pathfinder/_headers/supported_nvidia_headers.py`
75+
* `cuda/pathfinder/_dynamic_libs/supported_nvidia_libs.py`
76+
77+
No updates are required **prior** to a CTK release if all `cuda_pathfinder/tests/` pass.
78+
PyPI wheels for new CTK releases may become available only a few days or even weeks after the main CTK release date.
79+
Therefore it is likely that updates to the two files above will be required after the release, in the public repo.
80+
81+
#### `_ptx_to_cuda`
82+
83+
The `_ptx_to_cuda` dictionary in
84+
85+
* `cuda_bindings/cuda/bindings/utils/_ptx_utils.py`
86+
87+
may need to be updated, based on the table shown under the
88+
[PTX Release Notes](http://sw-mobile-docs/CUDA/GPGPU/parallel-thread-execution/index.html#release-notes).
89+
90+
#### CUDA enums
91+
92+
Two files under `cuda/core/experimental/_utils/` need to be updated semi-manually:
93+
94+
* `toolshed/reformat_cuda_enums_as_py.py` → `cuda/core/experimental/_utils/driver_cu_result_explanations.py`
95+
* `toolshed/reformat_cuda_enums_as_py.py` → `cuda/core/experimental/_utils/runtime_cuda_error_explanations.py`
96+
97+
See the instructions in the header of each of the files for details.
98+
99+
---
100+
31101
## How to Merge Public `main` into `ctk-next`
32102

33103
To keep `ctk-next` synchronized with the latest public changes, use the helper script:
@@ -37,15 +107,15 @@ qa/helpers/git_merge_public_main.sh
37107
```
38108

39109
This script fetches and merges the current `main` branch from the public `cuda-python` repository into the private `ctk-next` branch.
40-
It performs a clean merge without adding a remote permanently.
110+
It performs a clean merge without having to permanently add a remote.
41111

42112
## How to Squash-Merge ctk-next Back into Public main
43113

44114
When a new CTK release goes live:
45115

46116
1. Wait until the CTK release has been publicly posted.
47117

48-
2. Shortly after, create a PR in the public `cuda-python` repo that squashe-merges all `ctk-next` changes into `main`, excluding the `qa/` directory.
118+
2. Shortly after, create a PR in the public `cuda-python` repo that squash-merges all `ctk-next` changes into `main`, excluding the `qa/` directory.
49119

50120
To automate this step, use:
51121

0 commit comments

Comments
 (0)