Commit 3e794f4
[FEA]: Introduce Python module with CCCL headers (NVIDIA#3201)
* Add cccl/python/cuda_cccl directory and use from cuda_parallel, cuda_cooperative
* Run `copy_cccl_headers_to_aude_include()` before `setup()`
* Create python/cuda_cccl/cuda/_include/__init__.py, then simply import cuda._include to find the include path.
* Add cuda.cccl._version exactly as for cuda.cooperative and cuda.parallel
* Bug fix: cuda/_include only exists after shutil.copytree() ran.
* Use `f"cuda-cccl @ file://{cccl_path}/python/cuda_cccl"` in setup.py
* Remove CustomBuildCommand, CustomWheelBuild in cuda_parallel/setup.py (they are equivalent to the default functions)
* Replace := operator (needs Python 3.8+)
* Fix oversights: remove `pip3 install ./cuda_cccl` lines from README.md
* Restore original README.md: `pip3 install -e` now works on first pass.
* cuda_cccl/README.md: FOR INTERNAL USE ONLY
* Remove `$pymajor.$pyminor.` prefix in cuda_cccl _version.py (as suggested under NVIDIA#3201 (comment))
Command used: ci/update_version.sh 2 8 0
* Modernize pyproject.toml, setup.py
Trigger for this change:
* NVIDIA#3201 (comment)
* NVIDIA#3201 (comment)
* Install CCCL headers under cuda.cccl.include
Trigger for this change:
* NVIDIA#3201 (comment)
Unexpected accidental discovery: cuda.cooperative unit tests pass without CCCL headers entirely.
* Factor out cuda_cccl/cuda/cccl/include_paths.py
* Reuse cuda_cccl/cuda/cccl/include_paths.py from cuda_cooperative
* Add missing Copyright notice.
* Add missing __init__.py (cuda.cccl)
* Add `"cuda.cccl"` to `autodoc.mock_imports`
* Move cuda.cccl.include_paths into function where it is used. (Attempt to resolve Build and Verify Docs failure.)
* Add # TODO: move this to a module-level import
* Modernize cuda_cooperative/pyproject.toml, setup.py
* Convert cuda_cooperative to use hatchling as build backend.
* Revert "Convert cuda_cooperative to use hatchling as build backend."
This reverts commit 61637d6.
* Move numpy from [build-system] requires -> [project] dependencies
* Move pyproject.toml [project] dependencies -> setup.py install_requires, to be able to use CCCL_PATH
* Remove copy_license() and use license_files=["../../LICENSE"] instead.
* Further modernize cuda_cccl/setup.py to use pathlib
* Trivial simplifications in cuda_cccl/pyproject.toml
* Further simplify cuda_cccl/pyproject.toml, setup.py: remove inconsequential code
* Make cuda_cooperative/pyproject.toml more similar to cuda_cccl/pyproject.toml
* Add taplo-pre-commit to .pre-commit-config.yaml
* taplo-pre-commit auto-fixes
* Use pathlib in cuda_cooperative/setup.py
* CCCL_PYTHON_PATH in cuda_cooperative/setup.py
* Modernize cuda_parallel/pyproject.toml, setup.py
* Use pathlib in cuda_parallel/setup.py
* Add `# TOML lint & format` comment.
* Replace MANIFEST.in with `[tool.setuptools.package-data]` section in pyproject.toml
* Use pathlib in cuda/cccl/include_paths.py
* pre-commit autoupdate (EXCEPT clang-format, which was manually restored)
* Fixes after git merge main
* Resolve warning: AttributeError: '_Reduce' object has no attribute 'build_result'
```
=========================================================================== warnings summary ===========================================================================
tests/test_reduce.py::test_reduce_non_contiguous
/home/coder/cccl/python/devenv/lib/python3.12/site-packages/_pytest/unraisableexception.py:85: PytestUnraisableExceptionWarning: Exception ignored in: <function _Reduce.__del__ at 0x7bf123139080>
Traceback (most recent call last):
File "/home/coder/cccl/python/cuda_parallel/cuda/parallel/experimental/algorithms/reduce.py", line 132, in __del__
bindings.cccl_device_reduce_cleanup(ctypes.byref(self.build_result))
^^^^^^^^^^^^^^^^^
AttributeError: '_Reduce' object has no attribute 'build_result'
warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
============================================================= 1 passed, 93 deselected, 1 warning in 0.44s ==============================================================
```
* Move `copy_cccl_headers_to_cuda_cccl_include()` functionality to `class CustomBuildPy`
* Introduce cuda_cooperative/constraints.txt
* Also add cuda_parallel/constraints.txt
* Add `--constraint constraints.txt` in ci/test_python.sh
* Update Copyright dates
* Switch to https://github.com/ComPWA/taplo-pre-commit (the other repo has been archived by the owner on Jul 1, 2024)
For completeness: The other repo took a long time to install into the pre-commit cache; so long it lead to timeouts in the CCCL CI.
* Remove unused cuda_parallel jinja2 dependency (noticed by chance).
* Remove constraints.txt files, advertise running `pip install cuda-cccl` first instead.
* Make cuda_cooperative, cuda_parallel testing completely independent.
* Run only test_python.sh [skip-rapids][skip-matx][skip-docs][skip-vdc]
* Try using another runner (because V100 runners seem to be stuck) [skip-rapids][skip-matx][skip-docs][skip-vdc]
* Fix sign-compare warning (NVIDIA#3408) [skip-rapids][skip-matx][skip-docs][skip-vdc]
* Revert "Try using another runner (because V100 runners seem to be stuck) [skip-rapids][skip-matx][skip-docs][skip-vdc]"
This reverts commit ea33a21.
Error message: NVIDIA#3201 (comment)
* Try using A100 runner (because V100 runners still seem to be stuck) [skip-rapids][skip-matx][skip-docs][skip-vdc]
* Also show cuda-cooperative site-packages, cuda-parallel site-packages (after pip install) [skip-rapids][skip-matx][skip-docs][skip-vdc]
* Try using l4 runner (because V100 runners still seem to be stuck) [skip-rapids][skip-matx][skip-docs][skip-vdc]
* Restore original ci/matrix.yaml [skip-rapids]
* Use for loop in test_python.sh to avoid code duplication.
* Run only test_python.sh [skip-rapids][skip-matx][skip-docs][skip-vdc][skip pre-commit.ci]
* Comment out taplo-lint in pre-commit config [skip-rapids][skip-matx][skip-docs][skip-vdc]
* Revert "Run only test_python.sh [skip-rapids][skip-matx][skip-docs][skip-vdc][skip pre-commit.ci]"
This reverts commit ec206fd.
* Implement suggestion by @shwina (NVIDIA#3201 (review))
* Address feedback by @leofang
---------
Co-authored-by: Bernhard Manfred Gruber <bernhardmgruber@gmail.com>1 parent eb752d9 commit 3e794f4
File tree
24 files changed
+288
-271
lines changed- ci
- docs
- python
- cuda_cccl
- cuda/cccl
- cuda_cooperative
- cuda/cooperative/experimental
- cuda_parallel
- cuda/parallel/experimental
- algorithms
24 files changed
+288
-271
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
46 | 57 | | |
47 | 58 | | |
48 | 59 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | | - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
13 | 14 | | |
14 | | - | |
| 15 | + | |
15 | 16 | | |
16 | | - | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
20 | 30 | | |
21 | | - | |
| 31 | + | |
22 | 32 | | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
| 33 | + | |
31 | 34 | | |
32 | 35 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
| |||
110 | 111 | | |
111 | 112 | | |
112 | 113 | | |
| 114 | + | |
113 | 115 | | |
114 | 116 | | |
115 | 117 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
347 | 347 | | |
348 | 348 | | |
349 | 349 | | |
| 350 | + | |
350 | 351 | | |
351 | 352 | | |
352 | 353 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
0 commit comments