Skip to content

Check the shipped device code covers the GPUs a wheel claims - #21567

Open
shoumikhin wants to merge 19 commits into
gh/shoumikhin/86/headfrom
gh/shoumikhin/85/head
Open

Check the shipped device code covers the GPUs a wheel claims#21567
shoumikhin wants to merge 19 commits into
gh/shoumikhin/86/headfrom
gh/shoumikhin/85/head

Conversation

@shoumikhin

@shoumikhin shoumikhin commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

A GPU wheel can install cleanly, load all its libraries, and still fail
the moment a model runs. GPU code is compiled per hardware generation, so a wheel built for one
generation works there and is broken everywhere else the release promised. The failure surfaces
late and looks like a model problem rather than a packaging one.

Nothing checks for this today. This adds a release check that compares what the wheel claims
against what it actually contains:

✓ device code covers every claimed GPU architecture ['80', '90', '100', '120']

And when it does not:

libaoti_cuda_shims.so claims GPU architectures ['80', '90'] but only carries
device code for ['80']; a model would fail on hardware needing ['90']

It fails closed on a GPU wheel

Every reason the check cannot do its job is a reason to stop, not to pass: no architecture list
reached the build, the inspection tool is missing, no library is present, or an inspection
failed. Each of those leaves the shipped GPU code unverified. A CPU wheel says so and moves on.

Each library is inspected separately, so one library's GPU code cannot stand in for another's
that is missing.

Tested

Ran against real GPU wheels on Linux x86_64 and on two Jetson devices covering different GPU
generations. Confirmed it passes when the wheel matches its claim, and blocks in each failure
case above, including the one where the architecture list never reached the build.

[ghstack-poisoned]
[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/21567

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

❌ 29 New Failures, 168 Pending, 2 Unrelated Failures

As of commit 6adc652 with merge base 6bbb75a (image):

NEW FAILURES - The following jobs have failed:

FLAKY - The following jobs failed but were likely due to flakiness present on trunk:

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

[ghstack-poisoned]
shoumikhin added a commit that referenced this pull request Aug 4, 2026
A CUDA wheel can install cleanly, load its libraries, and still fail the moment a
model runs, because GPU device code is compiled per architecture. If a wheel was
built for one GPU generation, it is fine on that generation and broken everywhere
else the release row promised, and the failure looks like a model problem rather
than a packaging one.

Add a check that reads the architectures the build asked for and confirms each one
is present in the shipped accelerator libraries:

    ✓ device code covers every claimed GPU architecture: [80, 90, 100, 120]

The check skips with a stated reason when a build named no architectures, so the
CPU wheels are unaffected, and when the inspection tool is unavailable.


ghstack-source-id: 2efc906
ghstack-comment-id: 5174656934
Pull-Request: #21567
@shoumikhin
shoumikhin changed the base branch from gh/shoumikhin/84/head to gh/shoumikhin/86/head August 4, 2026 05:23
shoumikhin added a commit that referenced this pull request Aug 4, 2026
A CUDA wheel can install cleanly, load its libraries, and still fail the moment a
model runs, because GPU device code is compiled per architecture. If a wheel was
built for one GPU generation, it is fine on that generation and broken everywhere
else the release row promised, and the failure looks like a model problem rather
than a packaging one.

Add a check that reads the architectures the build asked for and confirms each one
is present in the shipped accelerator libraries:

    ✓ device code covers every claimed GPU architecture: [80, 90, 100, 120]

The check skips with a stated reason when a build named no architectures, so the
CPU wheels are unaffected, and when the inspection tool is unavailable.


ghstack-source-id: 2efc906
ghstack-comment-id: 5174656934
Pull-Request: #21567
[ghstack-poisoned]
[ghstack-poisoned]
shoumikhin added a commit that referenced this pull request Aug 4, 2026
A CUDA wheel can install cleanly, load its libraries, and still fail the moment a
model runs, because GPU device code is compiled per architecture. If a wheel was
built for one GPU generation, it is fine on that generation and broken everywhere
else the release row promised, and the failure looks like a model problem rather
than a packaging one.

Add a check that reads the architectures the build asked for and confirms each one
is present in the shipped accelerator libraries:

    ✓ device code covers every claimed GPU architecture: [80, 90, 100, 120]

The check skips with a stated reason when a build named no architectures, so the
CPU wheels are unaffected, and when the inspection tool is unavailable.


ghstack-source-id: 2efc906
ghstack-comment-id: 5174656934
Pull-Request: #21567
@shoumikhin
shoumikhin changed the base branch from gh/shoumikhin/86/head to gh/shoumikhin/87/head August 4, 2026 06:35
[ghstack-poisoned]
shoumikhin added a commit that referenced this pull request Aug 4, 2026
A CUDA wheel can install cleanly, load its libraries, and still fail the moment a
model runs, because GPU device code is compiled per architecture. If a wheel was
built for one GPU generation, it is fine on that generation and broken everywhere
else the release row promised, and the failure looks like a model problem rather
than a packaging one.

Add a check that reads the architectures the build asked for and confirms each one
is present in the shipped accelerator libraries:

    ✓ device code covers every claimed GPU architecture: [80, 90, 100, 120]

The check skips with a stated reason when a build named no architectures, so the
CPU wheels are unaffected, and when the inspection tool is unavailable.

ghstack-source-id: b2f2a6b
ghstack-comment-id: 5174656934
Pull-Request: #21567
[ghstack-poisoned]
shoumikhin added a commit that referenced this pull request Aug 4, 2026
A CUDA wheel can install cleanly, load its libraries, and still fail the moment a
model runs, because GPU device code is compiled per architecture. If a wheel was
built for one GPU generation, it is fine on that generation and broken everywhere
else the release row promised, and the failure looks like a model problem rather
than a packaging one.

Add a check that reads the architectures the build asked for and confirms each one
is present in the shipped accelerator libraries:

    ✓ device code covers every claimed GPU architecture: [80, 90, 100, 120]

The check skips with a stated reason when a build named no architectures, so the
CPU wheels are unaffected, and when the inspection tool is unavailable.

ghstack-source-id: 0719085
ghstack-comment-id: 5174656934
Pull-Request: #21567
[ghstack-poisoned]
shoumikhin added a commit that referenced this pull request Aug 4, 2026
A CUDA wheel can install cleanly, load its libraries, and still fail the moment a
model runs, because GPU device code is compiled per architecture. If a wheel was
built for one GPU generation, it is fine on that generation and broken everywhere
else the release row promised, and the failure looks like a model problem rather
than a packaging one.

Add a check that reads the architectures the build asked for and confirms each one
is present in the shipped accelerator libraries:

    ✓ device code covers every claimed GPU architecture: [80, 90, 100, 120]

The check skips with a stated reason when a build named no architectures, so the
CPU wheels are unaffected, and when the inspection tool is unavailable.

ghstack-source-id: 87c80af
ghstack-comment-id: 5174656934
Pull-Request: #21567
[ghstack-poisoned]
shoumikhin added a commit that referenced this pull request Aug 4, 2026
A CUDA wheel can install cleanly, load its libraries, and still fail the moment a
model runs, because GPU device code is compiled per architecture. If a wheel was
built for one GPU generation, it is fine on that generation and broken everywhere
else the release row promised, and the failure looks like a model problem rather
than a packaging one.

Add a check that reads the architectures the build asked for and confirms each one
is present in the shipped accelerator libraries:

    ✓ device code covers every claimed GPU architecture: [80, 90, 100, 120]

The check skips with a stated reason when a build named no architectures, so the
CPU wheels are unaffected, and when the inspection tool is unavailable.

ghstack-source-id: 0047dfe
ghstack-comment-id: 5174656934
Pull-Request: #21567
[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