Skip to content

Publish CUDA wheels so a GPU user does not build from source - #21571

Closed
shoumikhin wants to merge 1 commit into
gh/shoumikhin/83/headfrom
gh/shoumikhin/88/head
Closed

Publish CUDA wheels so a GPU user does not build from source#21571
shoumikhin wants to merge 1 commit into
gh/shoumikhin/83/headfrom
gh/shoumikhin/88/head

Conversation

@shoumikhin

Copy link
Copy Markdown
Contributor

Today pip install executorch only ever gives a CPU wheel. The CUDA delegate is
built and tested from source in CI, but no published wheel contains it, so anyone
who wants GPU support has to clone the repository and build.

Turn on the accelerator rows in the two Linux wheel workflows. The shared matrix
generator then emits one cell per supported CUDA train, each with its own local
version label, so the CPU and accelerator artifacts stay distinguishable. A plain
install still resolves the CPU wheel from the default index:

pip install executorch                          # CPU, unchanged
pip install executorch --index-url <cuda index> # CUDA delegate included

Two things are needed to make those artifacts correct rather than merely present.

First, device code. CMake otherwise compiles for whichever GPU the build machine
has, so a wheel built on one generation installs everywhere the row claims and
then fails when a model runs on a different GPU. Each row now names its
architectures explicitly, chosen for the hardware that row supports.

Second, the CUDA runtime. The delegate links it but does not bundle it, so the
wheel now declares those libraries as dependencies. The build variant is read
from the wheel build environment rather than detected from an installed compiler,
because a CPU wheel built on a machine that happens to have a CUDA toolkit must
not declare them.

[ghstack-poisoned]
@pytorch-bot

pytorch-bot Bot commented Aug 4, 2026

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/21571

Note: Links to docs will display an error until the docs builds have been completed.

❗ 1 Active SEVs

There are 1 currently active SEVs. If your PR is affected, please view them below:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@shoumikhin

Copy link
Copy Markdown
Contributor Author

Superseded by #21569, which carries this change. A missing Pull-Request: trailer on the local commit made each push open a new pull request instead of updating the existing one. Closing the duplicates so the stack reads as one pull request per change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant