Skip to content

[CI] Download sccache from upstream releases directly - #189365

Closed
luhenry wants to merge 1 commit into
pytorch:mainfrom
riseproject-dev:sccache-multiarch
Closed

luhenry wants to merge 1 commit into
pytorch:mainfrom
riseproject-dev:sccache-multiarch

Conversation

@luhenry

@luhenry luhenry commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

The official releases are available straight at https://github.com/mozilla/sccache/releases. Download the binaries from there rather than building them by hand

The official releases are available straight at https://github.com/mozilla/sccache/releases. Download the binaries from there rather than building them by hand
@luhenry
luhenry requested a review from a team as a code owner July 9, 2026 07:41
@pytorch-bot

pytorch-bot Bot commented Jul 9, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

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

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

❌ 1 New Failure

As of commit 3544670 with merge base e7206c0 (image):

NEW FAILURE - The following job has failed:

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

@pytorch-bot

pytorch-bot Bot commented Jul 9, 2026 •

Copy link
Copy Markdown

Workflows were awaiting approval. CI has now been triggered for the ciflow labels on this PR.

@luhenry

luhenry commented Jul 9, 2026

Copy link
Copy Markdown
Contributor Author

cc @malfet @atalman @Skylion007 @zxiiro

@luhenry

luhenry commented Jul 9, 2026

Copy link
Copy Markdown
Contributor Author

Relates to #187826

luhenry added a commit to riseproject-dev/pytorch that referenced this pull request Jul 9, 2026
luhenry added a commit to riseproject-dev/pytorch that referenced this pull request Jul 9, 2026
@luhenry

luhenry commented Jul 10, 2026

Copy link
Copy Markdown
Contributor Author

@pytorchmergebot merge

@pytorch-bot pytorch-bot Bot added the ciflow/trunk Trigger trunk jobs on your pull request label Jul 10, 2026
@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge failed

Reason: Approvers from one of the following sets are needed:

  • OSS CI (alband, pytorch/pytorch-dev-infra)
  • Metamates (8Keep, aditvenk, AmesingFlank, andrewor14, andyanwang, ...)
  • Core Reviewers (mruberry, lezcano, Skylion007, ngimel, peterbell10, ...)
  • Core Maintainers (soumith, gchanan, ezyang, malfet, albanD, ...)
Details for Dev Infra team Raised by workflow job

Failing merge rule: Core Maintainers

@luhenry

luhenry commented Jul 10, 2026

Copy link
Copy Markdown
Contributor Author

@pytorchmergebot help

@pytorch-bot

pytorch-bot Bot commented Jul 10, 2026

Copy link
Copy Markdown

❌ 🤖 pytorchbot command failed:

@pytorchbot: error: argument command: invalid choice: 'help' (choose from 'merge', 'revert', 'rebase', 'label', 'drci', 'lint', 'fix-lint', 'apply-lint', 'cherry-pick')

usage: @pytorchbot [-h]
                   
                   {merge,revert,rebase,label,drci,lint,fix-lint,apply-lint,cherry-pick}
                   ...

Try @pytorchbot --help for more info.

@luhenry

luhenry commented Jul 10, 2026

Copy link
Copy Markdown
Contributor Author

@pytorchmergebot merge -i

@pytorch-bot

pytorch-bot Bot commented Jul 10, 2026

Copy link
Copy Markdown

-i flag is only allowed for users with write permissions

@luhenry

luhenry commented Jul 10, 2026

Copy link
Copy Markdown
Contributor Author

@pytorchmergebot merge

@luhenry

luhenry commented Jul 10, 2026

Copy link
Copy Markdown
Contributor Author

@pytorchbot --help

@pytorch-bot

pytorch-bot Bot commented Jul 10, 2026

Copy link
Copy Markdown

PyTorchBot Help

usage: @pytorchbot [-h]
                   
                   {merge,revert,rebase,label,drci,lint,fix-lint,apply-lint,cherry-pick}
                   ...

In order to invoke the bot on your PR, include a line that starts with
@pytorchbot anywhere in a comment. That line will form the command; no
multi-line commands are allowed. Some commands may be used on issues as specified below.

Example:
    Some extra context, blah blah, wow this PR looks awesome

    @pytorchbot merge

optional arguments:
  -h, --help            Show this help message and exit.

command:
  {merge,revert,rebase,label,drci,lint,fix-lint,apply-lint,cherry-pick}
    merge               Merge a PR
    revert              Revert a PR
    rebase              Rebase a PR
    label               Add label to a PR
    drci                Update Dr. CI
    lint                Apply lint fixes to a PR
    fix-lint            ==SUPPRESS==
    apply-lint          ==SUPPRESS==
    cherry-pick         Cherry pick a PR onto a release branch

Merge

usage: @pytorchbot merge [-f MESSAGE | -i] [-ic] [-r [{viable/strict,main}]]

Merge an accepted PR, subject to the rules in .github/merge_rules.json.
By default, this will wait for all required checks (lint, pull) to succeed before merging.

optional arguments:
  -f MESSAGE, --force MESSAGE
                        Merge without checking anything. This requires a reason for auditting purpose, for example:
                        @pytorchbot merge -f 'Minor update to fix lint. Expecting all PR tests to pass'
                        
                        Please use `-f` as last resort, prefer `--ignore-current` to continue the merge ignoring current failures. This will allow currently pending tests to finish and report signal before the merge.
  -i, --ignore-current  Merge while ignoring the currently failing jobs.  Behaves like -f if there are no pending jobs.
  -ic                   Old flag for --ignore-current. Deprecated in favor of -i.
  -r [{viable/strict,main}], --rebase [{viable/strict,main}]
                        Rebase the PR to re run checks before merging.  Accepts viable/strict or main as branch options and will default to viable/strict if not specified.

Revert

usage: @pytorchbot revert -m MESSAGE -c
                          {nosignal,ignoredsignal,landrace,weird,ghfirst,autorevert}

Revert a merged PR. This requires that you are a Meta employee.

Example:
  @pytorchbot revert -m="This is breaking tests on trunk. hud.pytorch.org/" -c=nosignal

optional arguments:
  -m MESSAGE, --message MESSAGE
                        The reason you are reverting, will be put in the commit message. Must be longer than 3 words.
  -c {nosignal,ignoredsignal,landrace,weird,ghfirst,autorevert}, --classification {nosignal,ignoredsignal,landrace,weird,ghfirst,autorevert}
                        A machine-friendly classification of the revert reason.

Rebase

usage: @pytorchbot rebase [-s | -b BRANCH]

Rebase a PR. Rebasing defaults to the stable viable/strict branch of pytorch.
Repeat contributor may use this command to rebase their PR.

optional arguments:
  -s, --stable          [DEPRECATED] Rebase onto viable/strict
  -b BRANCH, --branch BRANCH
                        Branch you would like to rebase to

Label

usage: @pytorchbot label labels [labels ...]

Adds label to a PR or Issue [Can be used on Issues]

positional arguments:
  labels  Labels to add to given Pull Request or Issue [Can be used on Issues]

Dr CI

usage: @pytorchbot drci 

Update Dr. CI. Updates the Dr. CI comment on the PR in case it's gotten out of sync with actual CI results.

Lint

usage: @pytorchbot lint 

Apply lint fixes to the PR. This will trigger a workflow that automatically
applies lint fixes and pushes them to the PR branch.

Aliases: @pytorchbot fix-lint, @pytorchbot apply-lint

cherry-pick

usage: @pytorchbot cherry-pick --onto ONTO [--fixes FIXES] -c
                               {regression,critical,fixnewfeature,docs,release}

Cherry pick a pull request onto a release branch for inclusion in a release

optional arguments:
  --onto ONTO, --into ONTO
                        Branch you would like to cherry pick onto (Example: release/2.1)
  --fixes FIXES         Link to the issue that your PR fixes (Example: https://github.com/pytorch/pytorch/issues/110666)
  -c {regression,critical,fixnewfeature,docs,release}, --classification {regression,critical,fixnewfeature,docs,release}
                        A machine-friendly classification of the cherry-pick reason.

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge failed

Reason: 1 jobs have failed, first few of them are: trunk / macos-py3-arm64 / test (default, 3, 3, macos-m1-stable)

Details for Dev Infra team Raised by workflow job

@luhenry

luhenry commented Jul 10, 2026

Copy link
Copy Markdown
Contributor Author

@zxiiro @Skylion007 the macos-py3-arm64 failure should be unrelated: it's in some testing (which doesn't depend on sccache AFAICT) and on macos which doesn't install sccache.

@zxiiro

zxiiro commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

@pytorchmergebot merge -i

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge started

Your change will be merged while ignoring the following 1 checks: trunk / macos-py3-arm64 / test (default, 3, 3, macos-m1-stable)

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

tinglvv added a commit that referenced this pull request Jul 24, 2026
nvcc 13.3+ injects a valueless --simt-only flag (Tile compilation) into the
cicc/cudafe++ sub-commands of `nvcc --dryrun`, typically right before -o. The
prebuilt sccache 0.16.0 locates the cicc/ptxas input by a fixed offset from the
end of the argument list and groups the dryrun sub-commands positionally, so the
extra token makes it mis-locate the input and skip the device compile. ptxas
then produces no .cubin and the build dies with "fatbinary fatal: Could not open
input file '*.cubin'". This affects any separable/relocatable (-rdc=true) CUDA
target (e.g. gloo_cuda, torch_nvshmem).

Revert #189365 (download prebuilt sccache) and build sccache 0.16.0 from source
again, applying the upstream fix backported from mozilla/sccache#2722
(patches/sccache-nvcc-13.3-dryrun-parsing.patch). It locates the cicc/ptxas
input by its generated-file suffix (.cpp1.ii / .ptx) instead of by position, in
both cicc.rs and nvcc.rs. Building from source for all images keeps a single
sccache binary across the fleet; the patch is a no-op on older CUDA (it only
changes how the input is located and falls back to the old offset).

Drop the from-source build and return to the prebuilt binary once a sccache
release including #2722 ships. See #190832.

Test Plan:
Not buildable on the author's machine (no cargo/docker). Validate in a CUDA
13.3+ CI image (e.g. cuda13.4):

  echo '__global__ void k() {}' > repro.cu
  sccache nvcc -rdc=true -gencode arch=compute_75,code=sm_75 -c repro.cu -o repro.o  # succeeds, no fatbinary error

and confirm older-CUDA / non-CUDA images still build and cache normally.

Authored with assistance from Claude.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
tinglvv added a commit that referenced this pull request Jul 24, 2026
nvcc 13.3+ injects a valueless --simt-only flag (Tile compilation) into the
cicc/cudafe++ sub-commands of `nvcc --dryrun`, typically right before -o. The
prebuilt sccache 0.16.0 locates the cicc/ptxas input by a fixed offset from the
end of the argument list and groups the dryrun sub-commands positionally, so the
extra token makes it mis-locate the input and skip the device compile. ptxas
then produces no .cubin and the build dies with "fatbinary fatal: Could not open
input file '*.cubin'". This affects any separable/relocatable (-rdc=true) CUDA
target (e.g. gloo_cuda, torch_nvshmem).

Revert #189365 (download prebuilt sccache) and build sccache 0.16.0 from source
again, applying the upstream fix backported from mozilla/sccache#2722
(patches/sccache-nvcc-13.3-dryrun-parsing.patch). It locates the cicc/ptxas
input by its generated-file suffix (.cpp1.ii / .ptx) instead of by position, in
both cicc.rs and nvcc.rs. Building from source for all images keeps a single
sccache binary across the fleet; the patch is a no-op on older CUDA (it only
changes how the input is located and falls back to the old offset).

Drop the from-source build and return to the prebuilt binary once a sccache
release including #2722 ships. See #190832.

Test Plan:
Not buildable on the author's machine (no cargo/docker). Validate in a CUDA
13.3+ CI image (e.g. cuda13.4):

  echo '__global__ void k() {}' > repro.cu
  sccache nvcc -rdc=true -gencode arch=compute_75,code=sm_75 -c repro.cu -o repro.o  # succeeds, no fatbinary error

and confirm older-CUDA / non-CUDA images still build and cache normally.

Authored with assistance from Claude.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
tinglvv added a commit that referenced this pull request Jul 27, 2026
nvcc 13.3+ injects a valueless --simt-only flag (Tile compilation) into the
cicc/cudafe++ sub-commands of `nvcc --dryrun`, typically right before -o. The
prebuilt sccache 0.16.0 locates the cicc/ptxas input by a fixed offset from the
end of the argument list and groups the dryrun sub-commands positionally, so the
extra token makes it mis-locate the input and skip the device compile. ptxas
then produces no .cubin and the build dies with "fatbinary fatal: Could not open
input file '*.cubin'". This affects any separable/relocatable (-rdc=true) CUDA
target (e.g. gloo_cuda, torch_nvshmem).

Revert #189365 (download prebuilt sccache) and build sccache 0.16.0 from source
again, applying the upstream fix backported from mozilla/sccache#2722
(patches/sccache-nvcc-13.3-dryrun-parsing.patch). It locates the cicc/ptxas
input by its generated-file suffix (.cpp1.ii / .ptx) instead of by position, in
both cicc.rs and nvcc.rs. Building from source for all images keeps a single
sccache binary across the fleet; the patch is a no-op on older CUDA (it only
changes how the input is located and falls back to the old offset).

Drop the from-source build and return to the prebuilt binary once a sccache
release including #2722 ships. See #190832.

Test Plan:
Not buildable on the author's machine (no cargo/docker). Validate in a CUDA
13.3+ CI image (e.g. cuda13.4):

  echo '__global__ void k() {}' > repro.cu
  sccache nvcc -rdc=true -gencode arch=compute_75,code=sm_75 -c repro.cu -o repro.o  # succeeds, no fatbinary error

and confirm older-CUDA / non-CUDA images still build and cache normally.

Authored with assistance from Claude.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
tinglvv added a commit that referenced this pull request Jul 27, 2026
nvcc 13.3+ injects a valueless --simt-only flag (Tile compilation) into the
cicc/cudafe++ sub-commands of `nvcc --dryrun`, typically right before -o. The
prebuilt sccache 0.16.0 locates the cicc/ptxas input by a fixed offset from the
end of the argument list and groups the dryrun sub-commands positionally, so the
extra token makes it mis-locate the input and skip the device compile. ptxas
then produces no .cubin and the build dies with "fatbinary fatal: Could not open
input file '*.cubin'". This affects any separable/relocatable (-rdc=true) CUDA
target (e.g. gloo_cuda, torch_nvshmem).

Revert #189365 (download prebuilt sccache) and build sccache 0.16.0 from source
again, applying the upstream fix backported from mozilla/sccache#2722
(patches/sccache-nvcc-13.3-dryrun-parsing.patch). It locates the cicc/ptxas
input by its generated-file suffix (.cpp1.ii / .ptx) instead of by position, in
both cicc.rs and nvcc.rs. Building from source for all images keeps a single
sccache binary across the fleet; the patch is a no-op on older CUDA (it only
changes how the input is located and falls back to the old offset).

Drop the from-source build and return to the prebuilt binary once a sccache
release including #2722 ships. See #190832.

Test Plan:
Not buildable on the author's machine (no cargo/docker). Validate in a CUDA
13.3+ CI image (e.g. cuda13.4):

  echo '__global__ void k() {}' > repro.cu
  sccache nvcc -rdc=true -gencode arch=compute_75,code=sm_75 -c repro.cu -o repro.o  # succeeds, no fatbinary error

and confirm older-CUDA / non-CUDA images still build and cache normally.

Authored with assistance from Claude.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
pytorchmergebot pushed a commit that referenced this pull request Jul 29, 2026
nvcc 13.3+ injects a valueless --simt-only flag (Tile compilation) into the
cicc/cudafe++ sub-commands of `nvcc --dryrun`, typically right before -o. The
prebuilt sccache 0.16.0 locates the cicc/ptxas input by a fixed offset from the
end of the argument list and groups the dryrun sub-commands positionally, so the
extra token makes it mis-locate the input and skip the device compile. ptxas
then produces no .cubin and the build dies with "fatbinary fatal: Could not open
input file '*.cubin'". This affects any separable/relocatable (-rdc=true) CUDA
target (e.g. gloo_cuda, torch_nvshmem).

Revert #189365 (download prebuilt sccache) and build sccache 0.16.0 from source
again, applying the upstream fix backported from mozilla/sccache#2722
(patches/sccache-nvcc-13.3-dryrun-parsing.patch). It locates the cicc/ptxas
input by its generated-file suffix (.cpp1.ii / .ptx) instead of by position, in
both cicc.rs and nvcc.rs. Building from source for all images keeps a single
sccache binary across the fleet; the patch is a no-op on older CUDA (it only
changes how the input is located and falls back to the old offset).

Drop the from-source build and return to the prebuilt binary once a sccache
release including #2722 ships. See #190832.

Test Plan:
Not buildable on the author's machine (no cargo/docker). Validate in a CUDA
13.3+ CI image (e.g. cuda13.4):

  echo '__global__ void k() {}' > repro.cu
  sccache nvcc -rdc=true -gencode arch=compute_75,code=sm_75 -c repro.cu -o repro.o  # succeeds, no fatbinary error

and confirm older-CUDA / non-CUDA images still build and cache normally.

Authored with assistance from Claude.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
pytorchmergebot pushed a commit that referenced this pull request Jul 29, 2026
nvcc 13.3+ injects a valueless --simt-only flag (Tile compilation) into the
cicc/cudafe++ sub-commands of `nvcc --dryrun`, typically right before -o. The
prebuilt sccache 0.16.0 locates the cicc/ptxas input by a fixed offset from the
end of the argument list and groups the dryrun sub-commands positionally, so the
extra token makes it mis-locate the input and skip the device compile. ptxas
then produces no .cubin and the build dies with "fatbinary fatal: Could not open
input file '*.cubin'". This affects any separable/relocatable (-rdc=true) CUDA
target (e.g. gloo_cuda, torch_nvshmem).

Revert #189365 (download prebuilt sccache) and build sccache 0.16.0 from source
again, applying the upstream fix backported from mozilla/sccache#2722
(patches/sccache-nvcc-13.3-dryrun-parsing.patch). It locates the cicc/ptxas
input by its generated-file suffix (.cpp1.ii / .ptx) instead of by position, in
both cicc.rs and nvcc.rs. Building from source for all images keeps a single
sccache binary across the fleet; the patch is a no-op on older CUDA (it only
changes how the input is located and falls back to the old offset).

Drop the from-source build and return to the prebuilt binary once a sccache
release including #2722 ships. See #190832.

Test Plan:
Not buildable on the author's machine (no cargo/docker). Validate in a CUDA
13.3+ CI image (e.g. cuda13.4):

  echo '__global__ void k() {}' > repro.cu
  sccache nvcc -rdc=true -gencode arch=compute_75,code=sm_75 -c repro.cu -o repro.o  # succeeds, no fatbinary error

and confirm older-CUDA / non-CUDA images still build and cache normally.

Authored with assistance from Claude.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
tinglvv added a commit that referenced this pull request Jul 30, 2026
…ges only)

nvcc 13.3+ injects a valueless --simt-only flag (Tile compilation) into the
cicc/cudafe++ sub-commands of `nvcc --dryrun`, typically right before -o. The
prebuilt sccache 0.16.0 locates the cicc/ptxas input by a fixed offset from the
end of the argument list and groups the dryrun sub-commands positionally, so the
extra token makes it mis-locate the input and skip the device compile. ptxas
then produces no .cubin and the build dies with "fatbinary fatal: Could not open
input file '*.cubin'". This affects any separable/relocatable (-rdc=true) CUDA
target (e.g. gloo_cuda, torch_nvshmem).

Build sccache 0.16.0 from source with the upstream fix backported from
mozilla/sccache#2722 (patches/sccache-nvcc-13.3-dryrun-parsing.patch), which
locates the cicc/ptxas input by its generated-file suffix (.cpp1.ii / .ptx)
instead of by position, in both cicc.rs and nvcc.rs.

Gate the from-source build to CUDA images only (detected via nvcc): only nvcc
is affected by the bug. Non-CUDA and riscv64 images keep the prebuilt binary
from #189365 -- they never invoke nvcc, so they are unaffected, and a from-source
cargo build under the riscv64 QEMU emulation would be impractically slow. This
also avoids the (currently failing) from-source build on non-CUDA images such as
linux-jammy-py3.10-gcc11-mobile-lightweight-dispatch.

Drop the from-source build and return to the prebuilt binary everywhere once a
sccache release including #2722 ships. See #190832.

Test Plan:
Not buildable on the author's machine (no cargo/docker). Validate in a CUDA
13.3+ CI image (e.g. cuda13.4):

  echo '__global__ void k() {}' > repro.cu
  sccache nvcc -rdc=true -gencode arch=compute_75,code=sm_75 -c repro.cu -o repro.o  # succeeds, no fatbinary error

and confirm older-CUDA / non-CUDA images still build and cache normally.

Authored with assistance from Claude.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
tinglvv added a commit that referenced this pull request Jul 30, 2026
…ges only)

nvcc 13.3+ injects a valueless --simt-only flag (Tile compilation) into the
cicc/cudafe++ sub-commands of `nvcc --dryrun`, typically right before -o. The
prebuilt sccache 0.16.0 locates the cicc/ptxas input by a fixed offset from the
end of the argument list and groups the dryrun sub-commands positionally, so the
extra token makes it mis-locate the input and skip the device compile. ptxas
then produces no .cubin and the build dies with "fatbinary fatal: Could not open
input file '*.cubin'". This affects any separable/relocatable (-rdc=true) CUDA
target (e.g. gloo_cuda, torch_nvshmem).

Build sccache 0.16.0 from source with the upstream fix backported from
mozilla/sccache#2722 (patches/sccache-nvcc-13.3-dryrun-parsing.patch), which
locates the cicc/ptxas input by its generated-file suffix (.cpp1.ii / .ptx)
instead of by position, in both cicc.rs and nvcc.rs.

Source the cargo env from $CARGO_HOME. The builder images set CARGO_HOME=/opt/rust
(rust is pre-installed there and /opt/rust/bin is on PATH), so rustup's env file
is /opt/rust/env, not $HOME/.cargo/env. The first from-source attempt hardcoded
`. "$HOME/.cargo/env"`, which does not exist, so every docker image that ran the
build failed at that line before reaching cargo (this is what caused the revert
of the first landing). Use `. "${CARGO_HOME:-$HOME/.cargo}/env"`.

Gate the from-source build to CUDA images only (detected via nvcc): only nvcc is
affected by the bug. Non-CUDA and riscv64 images keep the prebuilt binary from
 #189365 -- they never invoke nvcc, so they are unaffected, and this avoids the
extra cargo build (and its failure modes) on images that do not need the patch.

Drop the from-source build and return to the prebuilt binary everywhere once a
sccache release including #2722 ships. See #190832.

Test Plan:
Not buildable on the author's machine (no cargo/docker). The patch applies
cleanly to sccache v0.16.0 (`git apply --check`). Validate in a CUDA 13.3+ CI
image (e.g. cuda13.4):

  echo '__global__ void k() {}' > repro.cu
  sccache nvcc -rdc=true -gencode arch=compute_75,code=sm_75 -c repro.cu -o repro.o  # succeeds, no fatbinary error

and confirm older-CUDA / non-CUDA images still build and cache normally.

Authored with assistance from Claude.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
tinglvv added a commit that referenced this pull request Jul 30, 2026
…ges only)

nvcc 13.3+ injects a valueless --simt-only flag (Tile compilation) into the
cicc/cudafe++ sub-commands of `nvcc --dryrun`, typically right before -o. The
prebuilt sccache 0.16.0 locates the cicc/ptxas input by a fixed offset from the
end of the argument list and groups the dryrun sub-commands positionally, so the
extra token makes it mis-locate the input and skip the device compile. ptxas
then produces no .cubin and the build dies with "fatbinary fatal: Could not open
input file '*.cubin'". This affects any separable/relocatable (-rdc=true) CUDA
target (e.g. gloo_cuda, torch_nvshmem).

Build sccache 0.16.0 from source with the upstream fix backported from
mozilla/sccache#2722 (patches/sccache-nvcc-13.3-dryrun-parsing.patch), which
locates the cicc/ptxas input by its generated-file suffix (.cpp1.ii / .ptx)
instead of by position, in both cicc.rs and nvcc.rs.

Source the cargo env from $CARGO_HOME. The builder images set CARGO_HOME=/opt/rust
(rust is pre-installed there and /opt/rust/bin is on PATH), so rustup's env file
is /opt/rust/env, not $HOME/.cargo/env. The first from-source attempt hardcoded
`. "$HOME/.cargo/env"`, which does not exist, so every docker image that ran the
build failed at that line before reaching cargo (this is what caused the revert
of the first landing). Use `. "${CARGO_HOME:-$HOME/.cargo}/env"`.

Gate the from-source build to CUDA images only (detected via nvcc): only nvcc is
affected by the bug. Non-CUDA and riscv64 images keep the prebuilt binary from
 #189365 -- they never invoke nvcc, so they are unaffected, and this avoids the
extra cargo build (and its failure modes) on images that do not need the patch.

Drop the from-source build and return to the prebuilt binary everywhere once a
sccache release including #2722 ships. See #190832.

Test Plan:
Not buildable on the author's machine (no cargo/docker). The patch applies
cleanly to sccache v0.16.0 (`git apply --check`). Validate in a CUDA 13.3+ CI
image (e.g. cuda13.4):

  echo '__global__ void k() {}' > repro.cu
  sccache nvcc -rdc=true -gencode arch=compute_75,code=sm_75 -c repro.cu -o repro.o  # succeeds, no fatbinary error

and confirm older-CUDA / non-CUDA images still build and cache normally.

Authored with assistance from Claude.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
tinglvv added a commit that referenced this pull request Jul 30, 2026
nvcc 13.3+ injects a valueless --simt-only flag (Tile compilation) into the
cicc/cudafe++ sub-commands of `nvcc --dryrun`, typically right before -o. The
prebuilt sccache 0.16.0 locates the cicc/ptxas input by a fixed offset from the
end of the argument list and groups the dryrun sub-commands positionally, so the
extra token makes it mis-locate the input and skip the device compile. ptxas
then produces no .cubin and the build dies with "fatbinary fatal: Could not open
input file '*.cubin'". This affects any separable/relocatable (-rdc=true) CUDA
target (e.g. gloo_cuda, torch_nvshmem).

Revert #189365 (prebuilt-binary download) and build sccache 0.16.0 from source
again, applying the upstream fix backported from mozilla/sccache#2722
(patches/sccache-nvcc-13.3-dryrun-parsing.patch), which locates the cicc/ptxas
input by its generated-file suffix (.cpp1.ii / .ptx) instead of by position, in
both cicc.rs and nvcc.rs. Build from source for all image types (riscv64 keeps
the prebuilt binary: no nvcc, no sccache-dist, and a from-source build under
QEMU emulation would be impractically slow) so the whole fleet shares a single
sccache binary; the patch is a no-op on older/non-CUDA compiles (it only changes
how the input is located and falls back to the old offset).

Source the cargo env from $CARGO_HOME. Since #186302 the builder images
pre-install rust at /opt/rust and set CARGO_HOME=/opt/rust, so rustup's env file
is /opt/rust/env, not $HOME/.cargo/env. Hardcoding `. "$HOME/.cargo/env"` made
every from-source image fail at that line before reaching cargo (this caused the
revert of the first landing). Use `. "${CARGO_HOME:-$HOME/.cargo}/env"`.

Drop the from-source build and return to the prebuilt binary once a sccache
release including #2722 ships. See #190832.

Test Plan:
Not buildable on the author's machine (no cargo/docker). The patch applies
cleanly to sccache v0.16.0 (`git apply --check`). Validate in a CUDA 13.3+ CI
image (e.g. cuda13.4):

  echo '__global__ void k() {}' > repro.cu
  sccache nvcc -rdc=true -gencode arch=compute_75,code=sm_75 -c repro.cu -o repro.o  # succeeds, no fatbinary error

and confirm non-CUDA / ROCm / XPU images still build and cache normally.

Authored with assistance from Claude.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
tinglvv added a commit that referenced this pull request Jul 30, 2026
nvcc 13.3+ injects a valueless --simt-only flag (Tile compilation) into the
cicc/cudafe++ sub-commands of `nvcc --dryrun`, typically right before -o. The
prebuilt sccache 0.16.0 locates the cicc/ptxas input by a fixed offset from the
end of the argument list and groups the dryrun sub-commands positionally, so the
extra token makes it mis-locate the input and skip the device compile. ptxas
then produces no .cubin and the build dies with "fatbinary fatal: Could not open
input file '*.cubin'". This affects any separable/relocatable (-rdc=true) CUDA
target (e.g. gloo_cuda, torch_nvshmem).

Revert #189365 (prebuilt-binary download) and build sccache 0.16.0 from source
again, applying the upstream fix backported from mozilla/sccache#2722
(patches/sccache-nvcc-13.3-dryrun-parsing.patch), which locates the cicc/ptxas
input by its generated-file suffix (.cpp1.ii / .ptx) instead of by position, in
both cicc.rs and nvcc.rs. Build from source for all image types (riscv64 keeps
the prebuilt binary: no nvcc, no sccache-dist, and a from-source build under
QEMU emulation would be impractically slow) so the whole fleet shares a single
sccache binary; the patch is a no-op on older/non-CUDA compiles (it only changes
how the input is located and falls back to the old offset).

Build with the pre-installed rust toolchain rather than reinstalling rustup.
Since #186302 the builder images pre-install a pinned rust (1.97.1) at
CARGO_HOME=/opt/rust with /opt/rust/bin on PATH. The first landing ran
`curl rustup | sh` then `. "$HOME/.cargo/env"`, but with CARGO_HOME=/opt/rust
that env file is /opt/rust/env, so the source failed and every from-source image
died at that line before reaching cargo -- this caused the revert. Drop the
redundant (and pin-diverging) rustup reinstall and just use the cargo already on
PATH.

Drop the from-source build and return to the prebuilt binary once a sccache
release including #2722 ships. See #190832.

Test Plan:
Not buildable on the author's machine (no cargo/docker). The patch applies
cleanly to sccache v0.16.0 (`git apply --check`). Validate in a CUDA 13.3+ CI
image (e.g. cuda13.4):

  echo '__global__ void k() {}' > repro.cu
  sccache nvcc -rdc=true -gencode arch=compute_75,code=sm_75 -c repro.cu -o repro.o  # succeeds, no fatbinary error

and confirm non-CUDA / ROCm / XPU images still build and cache normally.

Authored with assistance from Claude.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
pytorchmergebot pushed a commit that referenced this pull request Jul 30, 2026
nvcc 13.3+ injects a valueless --simt-only flag (Tile compilation) into the
cicc/cudafe++ sub-commands of `nvcc --dryrun`, typically right before -o. The
prebuilt sccache 0.16.0 locates the cicc/ptxas input by a fixed offset from the
end of the argument list and groups the dryrun sub-commands positionally, so the
extra token makes it mis-locate the input and skip the device compile. ptxas
then produces no .cubin and the build dies with "fatbinary fatal: Could not open
input file '*.cubin'". This affects any separable/relocatable (-rdc=true) CUDA
target (e.g. gloo_cuda, torch_nvshmem).

Revert #189365 (prebuilt-binary download) and build sccache 0.16.0 from source
again, applying the upstream fix backported from mozilla/sccache#2722
(patches/sccache-nvcc-13.3-dryrun-parsing.patch), which locates the cicc/ptxas
input by its generated-file suffix (.cpp1.ii / .ptx) instead of by position, in
both cicc.rs and nvcc.rs. Build from source for all image types (riscv64 keeps
the prebuilt binary: no nvcc, no sccache-dist, and a from-source build under
QEMU emulation would be impractically slow) so the whole fleet shares a single
sccache binary; the patch is a no-op on older/non-CUDA compiles (it only changes
how the input is located and falls back to the old offset).

Build with the pre-installed rust toolchain rather than reinstalling rustup.
Since #186302 the builder images pre-install a pinned rust (1.97.1) at
CARGO_HOME=/opt/rust with /opt/rust/bin on PATH. The first landing ran
`curl rustup | sh` then `. "$HOME/.cargo/env"`, but with CARGO_HOME=/opt/rust
that env file is /opt/rust/env, so the source failed and every from-source image
died at that line before reaching cargo -- this caused the revert. Drop the
redundant (and pin-diverging) rustup reinstall and just use the cargo already on
PATH.

Drop the from-source build and return to the prebuilt binary once a sccache
release including #2722 ships. See #190832.

Test Plan:
Not buildable on the author's machine (no cargo/docker). The patch applies
cleanly to sccache v0.16.0 (`git apply --check`). Validate in a CUDA 13.3+ CI
image (e.g. cuda13.4):

  echo '__global__ void k() {}' > repro.cu
  sccache nvcc -rdc=true -gencode arch=compute_75,code=sm_75 -c repro.cu -o repro.o  # succeeds, no fatbinary error

and confirm non-CUDA / ROCm / XPU images still build and cache normally.

Authored with assistance from Claude.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
pytorchmergebot pushed a commit that referenced this pull request Aug 1, 2026
nvcc 13.3+ injects a valueless --simt-only flag (Tile compilation) into the
cicc/cudafe++ sub-commands of `nvcc --dryrun`, typically right before -o. The
prebuilt sccache 0.16.0 locates the cicc/ptxas input by a fixed offset from the
end of the argument list and groups the dryrun sub-commands positionally, so the
extra token makes it mis-locate the input and skip the device compile. ptxas
then produces no .cubin and the build dies with "fatbinary fatal: Could not open
input file '*.cubin'". This affects any separable/relocatable (-rdc=true) CUDA
target (e.g. gloo_cuda, torch_nvshmem).

Revert #189365 (prebuilt-binary download) and build sccache 0.16.0 from source
again, applying the upstream fix backported from mozilla/sccache#2722
(patches/sccache-nvcc-13.3-dryrun-parsing.patch), which locates the cicc/ptxas
input by its generated-file suffix (.cpp1.ii / .ptx) instead of by position, in
both cicc.rs and nvcc.rs. Build from source for all image types (riscv64 keeps
the prebuilt binary: no nvcc, no sccache-dist, and a from-source build under
QEMU emulation would be impractically slow) so the whole fleet shares a single
sccache binary; the patch is a no-op on older/non-CUDA compiles (it only changes
how the input is located and falls back to the old offset).

Build with the pre-installed rust toolchain rather than reinstalling rustup.
Since #186302 the builder images pre-install a pinned rust (1.97.1) at
CARGO_HOME=/opt/rust with /opt/rust/bin on PATH. The first landing ran
`curl rustup | sh` then `. "$HOME/.cargo/env"`, but with CARGO_HOME=/opt/rust
that env file is /opt/rust/env, so the source failed and every from-source image
died at that line before reaching cargo -- this caused the revert. Drop the
redundant (and pin-diverging) rustup reinstall and just use the cargo already on
PATH.

Drop the from-source build and return to the prebuilt binary once a sccache
release including #2722 ships. See #190832.

Test Plan:
Not buildable on the author's machine (no cargo/docker). The patch applies
cleanly to sccache v0.16.0 (`git apply --check`). Validate in a CUDA 13.3+ CI
image (e.g. cuda13.4):

  echo '__global__ void k() {}' > repro.cu
  sccache nvcc -rdc=true -gencode arch=compute_75,code=sm_75 -c repro.cu -o repro.o  # succeeds, no fatbinary error

and confirm non-CUDA / ROCm / XPU images still build and cache normally.

Authored with assistance from Claude.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
pytorchmergebot pushed a commit that referenced this pull request Aug 2, 2026
nvcc 13.3+ injects a valueless --simt-only flag (Tile compilation) into the
cicc/cudafe++ sub-commands of `nvcc --dryrun`, typically right before -o. The
prebuilt sccache 0.16.0 locates the cicc/ptxas input by a fixed offset from the
end of the argument list and groups the dryrun sub-commands positionally, so the
extra token makes it mis-locate the input and skip the device compile. ptxas
then produces no .cubin and the build dies with "fatbinary fatal: Could not open
input file '*.cubin'". This affects any separable/relocatable (-rdc=true) CUDA
target (e.g. gloo_cuda, torch_nvshmem).

Revert #189365 (prebuilt-binary download) and build sccache 0.16.0 from source
again, applying the upstream fix backported from mozilla/sccache#2722
(patches/sccache-nvcc-13.3-dryrun-parsing.patch), which locates the cicc/ptxas
input by its generated-file suffix (.cpp1.ii / .ptx) instead of by position, in
both cicc.rs and nvcc.rs. Build from source for all image types (riscv64 keeps
the prebuilt binary: no nvcc, no sccache-dist, and a from-source build under
QEMU emulation would be impractically slow) so the whole fleet shares a single
sccache binary; the patch is a no-op on older/non-CUDA compiles (it only changes
how the input is located and falls back to the old offset).

Build with the pre-installed rust toolchain rather than reinstalling rustup.
Since #186302 the builder images pre-install a pinned rust (1.97.1) at
CARGO_HOME=/opt/rust with /opt/rust/bin on PATH. The first landing ran
`curl rustup | sh` then `. "$HOME/.cargo/env"`, but with CARGO_HOME=/opt/rust
that env file is /opt/rust/env, so the source failed and every from-source image
died at that line before reaching cargo -- this caused the revert. Drop the
redundant (and pin-diverging) rustup reinstall and just use the cargo already on
PATH.

Drop the from-source build and return to the prebuilt binary once a sccache
release including #2722 ships. See #190832.

Test Plan:
Not buildable on the author's machine (no cargo/docker). The patch applies
cleanly to sccache v0.16.0 (`git apply --check`). Validate in a CUDA 13.3+ CI
image (e.g. cuda13.4):

  echo '__global__ void k() {}' > repro.cu
  sccache nvcc -rdc=true -gencode arch=compute_75,code=sm_75 -c repro.cu -o repro.o  # succeeds, no fatbinary error

and confirm non-CUDA / ROCm / XPU images still build and cache normally.

Authored with assistance from Claude.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
pytorchmergebot pushed a commit that referenced this pull request Aug 2, 2026
nvcc 13.3+ injects a valueless --simt-only flag (Tile compilation) into the
cicc/cudafe++ sub-commands of `nvcc --dryrun`, typically right before -o. The
prebuilt sccache 0.16.0 locates the cicc/ptxas input by a fixed offset from the
end of the argument list and groups the dryrun sub-commands positionally, so the
extra token makes it mis-locate the input and skip the device compile. ptxas
then produces no .cubin and the build dies with "fatbinary fatal: Could not open
input file '*.cubin'". This affects any separable/relocatable (-rdc=true) CUDA
target (e.g. gloo_cuda, torch_nvshmem).

Revert #189365 (prebuilt-binary download) and build sccache 0.16.0 from source
again, applying the upstream fix backported from mozilla/sccache#2722
(patches/sccache-nvcc-13.3-dryrun-parsing.patch), which locates the cicc/ptxas
input by its generated-file suffix (.cpp1.ii / .ptx) instead of by position, in
both cicc.rs and nvcc.rs. Build from source for all image types (riscv64 keeps
the prebuilt binary: no nvcc, no sccache-dist, and a from-source build under
QEMU emulation would be impractically slow) so the whole fleet shares a single
sccache binary; the patch is a no-op on older/non-CUDA compiles (it only changes
how the input is located and falls back to the old offset).

Build with the pre-installed rust toolchain rather than reinstalling rustup.
Since #186302 the builder images pre-install a pinned rust (1.97.1) at
CARGO_HOME=/opt/rust with /opt/rust/bin on PATH. The first landing ran
`curl rustup | sh` then `. "$HOME/.cargo/env"`, but with CARGO_HOME=/opt/rust
that env file is /opt/rust/env, so the source failed and every from-source image
died at that line before reaching cargo -- this caused the revert. Drop the
redundant (and pin-diverging) rustup reinstall and just use the cargo already on
PATH.

Drop the from-source build and return to the prebuilt binary once a sccache
release including #2722 ships. See #190832.

Test Plan:
Not buildable on the author's machine (no cargo/docker). The patch applies
cleanly to sccache v0.16.0 (`git apply --check`). Validate in a CUDA 13.3+ CI
image (e.g. cuda13.4):

  echo '__global__ void k() {}' > repro.cu
  sccache nvcc -rdc=true -gencode arch=compute_75,code=sm_75 -c repro.cu -o repro.o  # succeeds, no fatbinary error

and confirm non-CUDA / ROCm / XPU images still build and cache normally.

Authored with assistance from Claude.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
tinglvv added a commit that referenced this pull request Aug 4, 2026
nvcc 13.3+ injects a valueless --simt-only flag (Tile compilation) into the
cicc/cudafe++ sub-commands of `nvcc --dryrun`, typically right before -o. The
prebuilt sccache 0.16.0 locates the cicc/ptxas input by a fixed offset from the
end of the argument list and groups the dryrun sub-commands positionally, so the
extra token makes it mis-locate the input and skip the device compile. ptxas
then produces no .cubin and the build dies with "fatbinary fatal: Could not open
input file '*.cubin'". This affects any separable/relocatable (-rdc=true) CUDA
target (e.g. gloo_cuda, torch_nvshmem).

Revert #189365 (prebuilt-binary download) and build sccache 0.16.0 from source
again, applying the upstream fix from mozilla/sccache#2722
(patches/sccache-nvcc-13.3-dryrun-parsing.patch). Build from source for all
image types (riscv64 keeps the prebuilt binary: no nvcc, no sccache-dist, and a
from-source build under QEMU emulation would be impractically slow) so the whole
fleet shares a single sccache binary.

The backport gates #2722 rather than taking it verbatim. Upstream replaces the
positional lookup with a search for the input's generated-file suffix
(.cpp1.ii / .ptx) unconditionally, for both cicc and ptxas. Upstream's own
dryrun fixture shows --simt-only on the cudafe++ and cicc lines but not on the
ptxas line, so ptxas offsets were already correct and did not need changing;
running the search there regressed CUDA < 13.3, where torchao's mxfp8 extension
fails to build with `Missing "cubin" file output` while stock sccache builds it
fine. Here the suffix search runs only when the argument at the historical
offset is not a generated input file, so every command line nvcc still emits in
the old shape parses exactly as stock 0.16.0 does -- same input, same cache keys
-- and 13.3+ still gets the fix on the cicc line that needs it.

The "Missing <lang> file output" error now also reports the parsed input and
argument lists. Reaching that error means the input was located at the wrong
argument and -o was consumed or dropped, and nvcc reshapes these sub-commands
between CUDA releases, so the argument vector as sccache saw it is the thing
needed to diagnose the next occurrence.

Two alternatives were considered. Dropping the ptxas half of #2722 outright is a
smaller diff, but it leaves cicc's search unconditional on older CUDA (the same
pattern, one compiler over) and gives ptxas no fallback if NVIDIA later shifts
its input off the offset the way it did for cicc. Disabling sccache on 13.3+
avoids the parser entirely but gives up CUDA caching, which is the point of
having sccache at all.

Build with the pre-installed rust toolchain rather than reinstalling rustup.
Since #186302 the builder images pre-install a pinned rust (1.97.1) at
CARGO_HOME=/opt/rust with /opt/rust/bin on PATH. The first landing ran
`curl rustup | sh` then `. "$HOME/.cargo/env"`, but with CARGO_HOME=/opt/rust
that env file is /opt/rust/env, so the source failed and every from-source image
died at that line before reaching cargo -- this caused the revert. Drop the
redundant (and pin-diverging) rustup reinstall and just use the cargo already on
PATH.

Drop the from-source build and return to the prebuilt binary once a sccache
release including #2722 ships. See #190832.

Test Plan:
Not buildable on the author's machine (no cargo/docker), so the patch is not
compiled or unit-tested locally. It applies cleanly to a pristine v0.16.0:

```
git clone --depth 1 --branch v0.16.0 https://github.com/mozilla/sccache /tmp/sccache
git -C /tmp/sccache apply --check .ci/docker/common/patches/sccache-nvcc-13.3-dryrun-parsing.patch
```

Validate in a CUDA 13.3+ CI image (e.g. cuda13.4):

```
echo '__global__ void k() {}' > repro.cu
sccache nvcc -rdc=true -gencode arch=compute_75,code=sm_75 -c repro.cu -o repro.o  # succeeds, no fatbinary error
```

and confirm the CUDA 13.0/13.2 torchao build (which regressed on the ungated
backport) plus non-CUDA / ROCm / XPU images still build and cache normally.

Authored with assistance from Claude.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
tinglvv added a commit that referenced this pull request Aug 4, 2026
nvcc 13.3+ injects a valueless --simt-only flag (Tile compilation) into the
cicc/cudafe++ sub-commands of `nvcc --dryrun`, typically right before -o. The
prebuilt sccache 0.16.0 locates the cicc/ptxas input by a fixed offset from the
end of the argument list and groups the dryrun sub-commands positionally, so the
extra token makes it mis-locate the input and skip the device compile. ptxas
then produces no .cubin and the build dies with "fatbinary fatal: Could not open
input file '*.cubin'". This affects any separable/relocatable (-rdc=true) CUDA
target (e.g. gloo_cuda, torch_nvshmem).

Revert #189365 (prebuilt-binary download) and build sccache 0.16.0 from source
again, applying the upstream fix from mozilla/sccache#2722
(patches/sccache-nvcc-13.3-dryrun-parsing.patch). Build from source for all
image types (riscv64 keeps the prebuilt binary: no nvcc, no sccache-dist, and a
from-source build under QEMU emulation would be impractically slow) so the whole
fleet shares a single sccache binary.

The backport gates #2722 rather than taking it verbatim. Upstream replaces the
positional lookup with a search for the input's generated-file suffix
(.cpp1.ii / .ptx) unconditionally, for both cicc and ptxas. Upstream's own
dryrun fixture shows --simt-only on the cudafe++ and cicc lines but not on the
ptxas line, so ptxas offsets were already correct and did not need changing;
running the search there regressed CUDA < 13.3, where torchao's mxfp8 extension
fails to build with `Missing "cubin" file output` while stock sccache builds it
fine. Here the suffix search runs only when the argument at the historical
offset is not a generated input file, so every command line nvcc still emits in
the old shape parses exactly as stock 0.16.0 does -- same input, same cache keys
-- and 13.3+ still gets the fix on the cicc line that needs it.

The "Missing <lang> file output" error now also reports the parsed input and
argument lists. Reaching that error means the input was located at the wrong
argument and -o was consumed or dropped, and nvcc reshapes these sub-commands
between CUDA releases, so the argument vector as sccache saw it is the thing
needed to diagnose the next occurrence.

Two alternatives were considered. Dropping the ptxas half of #2722 outright is a
smaller diff, but it leaves cicc's search unconditional on older CUDA (the same
pattern, one compiler over) and gives ptxas no fallback if NVIDIA later shifts
its input off the offset the way it did for cicc. Disabling sccache on 13.3+
avoids the parser entirely but gives up CUDA caching, which is the point of
having sccache at all.

Build with the pre-installed rust toolchain rather than reinstalling rustup.
Since #186302 the builder images pre-install a pinned rust (1.97.1) at
CARGO_HOME=/opt/rust with /opt/rust/bin on PATH. The first landing ran
`curl rustup | sh` then `. "$HOME/.cargo/env"`, but with CARGO_HOME=/opt/rust
that env file is /opt/rust/env, so the source failed and every from-source image
died at that line before reaching cargo -- this caused the revert. Drop the
redundant (and pin-diverging) rustup reinstall and just use the cargo already on
PATH.

Drop the from-source build and return to the prebuilt binary once a sccache
release including #2722 ships. See #190832.

Test Plan:
Not buildable on the author's machine (no cargo/docker), so the patch is not
compiled or unit-tested locally. It applies cleanly to a pristine v0.16.0:

```
git clone --depth 1 --branch v0.16.0 https://github.com/mozilla/sccache /tmp/sccache
git -C /tmp/sccache apply --check .ci/docker/common/patches/sccache-nvcc-13.3-dryrun-parsing.patch
```

Validate in a CUDA 13.3+ CI image (e.g. cuda13.4):

```
echo '__global__ void k() {}' > repro.cu
sccache nvcc -rdc=true -gencode arch=compute_75,code=sm_75 -c repro.cu -o repro.o  # succeeds, no fatbinary error
```

and confirm the CUDA 13.0/13.2 torchao build (which regressed on the ungated
backport) plus non-CUDA / ROCm / XPU images still build and cache normally.

Authored with assistance from Claude.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/docker ciflow/trunk Trigger trunk jobs on your pull request Merged open source topic: not user facing topic category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants