[Carry] Dockerfile: respect TORCH_CUDA_ARCH_LIST in extensions-build - #17
Draft
terafin wants to merge 1 commit into
Draft
[Carry] Dockerfile: respect TORCH_CUDA_ARCH_LIST in extensions-build#17terafin wants to merge 1 commit into
terafin wants to merge 1 commit into
Conversation
The DeepEP wheel-build stage hardcodes TORCH_CUDA_ARCH_LIST='9.0a 10.0a'
(Hopper + Blackwell) regardless of the torch_cuda_arch_list build-arg
that the rest of the Dockerfile honors. This is ~4m46s of compile time
for two arches even when the consumer passes a single different arch.
Honor the env override:
export TORCH_CUDA_ARCH_LIST="${TORCH_CUDA_ARCH_LIST:-9.0a 10.0a}"
When the env is unset (default upstream behavior preserved), it falls
back to '9.0a 10.0a'. When TORCH_CUDA_ARCH_LIST is exported by the
build context (e.g. via the existing torch_cuda_arch_list ARG), the
DeepEP build only emits PTX/SASS for the arches the consumer actually
needs.
Caveat — DeepEP requires SM90+ per upstream README
(https://github.com/deepseek-ai/DeepEP). Passing an Ampere-only list
(e.g. 8.6) will cause the DeepEP build to fail loudly rather than
silently shipping non-functional kernels. Consumers on Ampere should
include 9.0a in their arch list or build with --target chosen to skip
this stage.
Intarweb-only carry (fork-only — not filed upstream). Dockerfile-only
diff; carry-drift guard safe.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
intarweb-sync-bot
Bot
force-pushed
the
intarweb-dev
branch
29 times, most recently
from
June 14, 2026 10:09
cbeb0e5 to
5bcea71
Compare
intarweb-sync-bot
Bot
force-pushed
the
intarweb-dev
branch
17 times, most recently
from
June 19, 2026 23:09
f02f651 to
1f3d93f
Compare
intarweb-sync-bot
Bot
force-pushed
the
intarweb-dev
branch
13 times, most recently
from
June 28, 2026 09:26
5eadc10 to
03b0a58
Compare
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.
Internal carry, lands via FORK_CARRIED_COMMITS. Draft for visibility only — not intended to merge.
What
docker/Dockerfileextensions-build stage (DeepEP wheel) currently hardcodes:This compiles for Hopper + Blackwell unconditionally (~4m46s) regardless of the
torch_cuda_arch_listbuild-arg. Change to:Default behavior preserved when env is unset. Build-arg consumers get the speedup.
Why fork-only
Upstream serves a multi-arch audience; the hardcoded list is defensible there. We tune for our consumer's arch. Filed as fork carry, not as an upstream PR.
Caveat
DeepEP requires SM90+ (per upstream README). Ampere-only arch lists will fail-loud at compile time, which is preferable to silently shipping non-functional kernels.
Risk