Repository navigation
Build CUDA-enabled Python wheels on Linux and Windows - #274
Merged
Merged
Conversation
- Install CUDA 12.8 in the manylinux container and on a VS 2022 runner - Target sm_75 through sm_120 SASS plus sm_120 PTX - Add ipctk.cuda.is_available() (ipc::cuda::is_available() in C++) - Check each CUDA wheel imports and raises without a GPU - Fail the build if a wheel exceeds PyPI's 100 MB limit Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #274 +/- ##
=======================================
Coverage 96.92% 96.92%
=======================================
Files 194 194
Lines 17349 17349
Branches 943 943
=======================================
+ Hits 16815 16816 +1
+ Misses 534 533 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
pybind11's -flto reaches nvcc's device-link step, and GCC's LTO drops the fatbinData symbol the stub defines in top-level asm, so the Linux module failed to import. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Builds the
ipctkwheels with CUDA on Linux x86_64 and Windows, and adds a runtime check for whether the GPU code can run. macOS wheels stay CPU-only.cuda-nvcc,cuda-cudart-devel, andcuda-ccclfrom NVIDIA's rhel8 repo, installed inside the manylinux_2_28 container (GCC 14).Jimver/cuda-toolkit, thenmsvc-dev-cmd, and the build uses Ninja instead of the Visual Studio generator, ascuda.ymldoes.75-real;80-real;86-real;90-real;100-real;120-real;120-virtual. Turing through Blackwell get SASS, and newer GPUs can JIT from the sm_120 PTX.cudart(the CMake default). The wheel needs only the NVIDIA driver, and auditwheel has nolibcudartto bundle.Impacts:
pip install ipctkgetsipctk.cuda.LBVHon Linux and Windows.RuntimeError.windows-2022, becausewindows-latestships MSVC 19.51 (VS 2026), which CUDA 12.8 rejects.API changes
ipc::cuda::is_available()(ipc/utils/cuda/is_available.hpp) andipctk.cuda.is_available().cudaGetDeviceCountsucceeds with at least one device.falsein non-CUDA builds.CI
pypi.ymlnow runs on pull requests that touch the wheel build. Theupload_pypijob is skipped for them.python/tests/check_cuda_wheel.pyon the GPU-less runner. It asserts the wheel is a CUDA build, thatis_available()isFalse, and thatLBVH.buildraises instead of crashing.Type of change
How Has This Been Tested?
[utils][cuda]Catch2 test: in CUDA builds,is_available()predicts whethercuda::LBVHbuilds and detects or throws. In CPU builds, it isfalse.cuda.ymlruns the GPU path on its simulated T4.python/tests/test_cuda.py: the same behavior from Python.python.ymlruns it on CPU builds.check_cuda_wheel.pycorrectly rejects the CPU build.pypi.ymlCUDA wheels build and pass the no-GPU check (this PR's CI).Checklist