Skip to content

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

Open
shoumikhin wants to merge 11 commits into
gh/shoumikhin/83/headfrom
gh/shoumikhin/86/head
Open

Publish CUDA wheels so a GPU user does not build from source#21569
shoumikhin wants to merge 11 commits into
gh/shoumikhin/83/headfrom
gh/shoumikhin/86/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/21569

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

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

[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/binaries/all Release PRs with this label will build wheels for all python versions ciflow/binaries ciflow/cuda ciflow/nightly ciflow/trunk 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