Modernize CUDA build workflow: remove PowerShell, inline matrix, drop conda#43
Modernize CUDA build workflow: remove PowerShell, inline matrix, drop conda#43
Conversation
Co-authored-by: chamalgomes <106123134+chamalgomes@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Modernizes the CUDA wheel build GitHub Actions workflow by consolidating the matrix into a single job, switching from PowerShell to bash, and building inside an NVIDIA CUDA container to remove the conda/mamba toolchain setup.
Changes:
- Removes the separate
define_matrixjob and inlines the build matrix intobuild_wheels. - Replaces PowerShell scripting with bash (including version tag rewriting via
sed). - Uses an
nvidia/cudadevel container image and adds a CUDA stub linker flag for builds.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| cuda_config: | ||
| - ver: 13.1.1 | ||
| short: cu131 | ||
| arch: 75;80; |
There was a problem hiding this comment.
matrix.cuda_config.arch is set to 75;80; with a trailing semicolon. In CMake, semicolon-separated lists with a trailing ; typically introduce an empty list element, which can make CMAKE_CUDA_ARCHITECTURES include an empty architecture and fail configuration. Drop the trailing semicolon (e.g., 75;80) or represent architectures as a YAML list and join them explicitly.
| arch: 75;80; | |
| arch: 75;80 |
| name: Build Wheel CUDA ${{ matrix.cuda_config.ver }} Py ${{ matrix.pyver }} | ||
| runs-on: ubuntu-latest | ||
| container: | ||
| image: nvidia/cuda:${{ matrix.cuda_config.ver }}-devel-ubuntu24.04 |
There was a problem hiding this comment.
Running the job in an nvidia/cuda:* container means all steps execute inside that image. This workflow relies on several JavaScript/composite actions (actions/checkout, setup-uv, action-gh-release, attest-build-provenance) which require tooling like node (and git for checkout) to be present in the container. The nvidia/cuda images don’t guarantee those dependencies, so the workflow can fail early. Consider switching to a custom CUDA build image that includes node + git (and any build deps like cmake), or avoid a job-level container and instead run the CUDA build via docker run in a run: step.
Replaces PowerShell-based CUDA workflow with clean bash implementation using nvidia/cuda container directly, eliminating mamba/conda dependency and separate matrix definition job.
Changes
Removed:
define_matrixjob - matrix now inline inbuild_wheelsreleasetagmatrix variableCUDAVER,AVXVER,CUDA_PATH, etc.)Added:
nvidia/cuda:13.1.1-devel-ubuntu24.04container with CUDA pre-installedcuda_configmatrix structure withver,short,archpropertiesenable-cache: truefor uv setupCMAKE_EXE_LINKER_FLAGSfor CUDA stub linkingBash replacements:
Impact: 26 lines removed (22% reduction), 2 jobs → 1 job, cleaner dependency chain.
All preserved features intact: uv build, +cu131 naming, release upload, attestation, workflow_dispatch trigger.
Original prompt
This pull request was created from Copilot chat.
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.