Skip to content

Conversation

malfet
Copy link
Contributor

@malfet malfet commented Mar 6, 2024

This essentially reverts #95997 but switches to builds from source to official mozilla's sccache repo for CPU builds, except PCH one, see #139188

Fixes #121559

@malfet malfet requested a review from jeffdaily as a code owner March 6, 2024 18:19
@pytorch-bot pytorch-bot bot added the topic: not user facing topic category label Mar 6, 2024
Copy link

pytorch-bot bot commented Mar 6, 2024

🔗 Helpful Links

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

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

✅ No Failures

As of commit 1f7b209 with merge base b7524b0 (image):
💚 Looks good so far! There are no failures yet. 💚

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

@malfet malfet changed the title Build sccache from source for aarch64 Build sccache from source Mar 6, 2024
Copy link
Contributor

@atalman atalman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@malfet malfet added the ciflow/trunk Trigger trunk jobs on your pull request label Mar 6, 2024
@malfet malfet requested a review from a team as a code owner March 6, 2024 19:38
pytorchmergebot pushed a commit that referenced this pull request Mar 7, 2024
Because some implementations, like OpenDAL does not work with AWS IMDSv2, but this script will bridge the gap and enables more recent `sccache` releases(that switched from simple-s3 to OpenDAL) to work in current CI system

When launched it prints something like:
```
export AWS_ACCESS_KEY_ID=XXXXX
export AWS_SECRET_ACCESS_KEY=YYYY
export AWS_SESSION_TOKEN=ZZZZ
```
which can be `eval`ed and passed then sccache can use those failures.

Validated in #121323
Pull Request resolved: #121426
Approved by: https://github.com/Skylion007
@huydhn
Copy link
Contributor

huydhn commented Mar 8, 2024

IIRC, the upstream branch didn't seem to fully work with nvcc like our ancient fork when I tried this a year ago. I attempted to submit a PR to Mozilla with the additional changes but my Rust knowledge was too limit to make it work. May be upstream is good now, let's see

@malfet
Copy link
Contributor Author

malfet commented Mar 9, 2024

May be upstream is good now, let's see

I needed to make a tweak to our wrapper of wrappers and it seems to be working, but indeed, let's see...

@malfet
Copy link
Contributor Author

malfet commented Apr 16, 2024

@pytorchbot rebase

@pytorchmergebot
Copy link
Collaborator

@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here

@pytorchmergebot
Copy link
Collaborator

Successfully rebased malfet-patch-4 onto refs/remotes/origin/viable/strict, please pull locally before adding more changes (for example, via git checkout malfet-patch-4 && git pull --rebase)

Copy link
Contributor

Looks like this PR hasn't been updated in a while so we're going to go ahead and mark this as Stale.
Feel free to remove the Stale label if you feel this was a mistake.
If you are unable to remove the Stale label please contact a maintainer in order to do so.
If you want the bot to never mark this PR stale again, add the no-stale label.
Stale pull requests will automatically be closed after 30 days of inactivity.

@github-actions github-actions bot added the Stale label Jun 15, 2024
@malfet
Copy link
Contributor Author

malfet commented Jul 3, 2024

@pytorchbot rebase

@pytorchmergebot
Copy link
Collaborator

@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here

@pytorchmergebot
Copy link
Collaborator

Successfully rebased malfet-patch-4 onto refs/remotes/origin/viable/strict, please pull locally before adding more changes (for example, via git checkout malfet-patch-4 && git pull --rebase)

@malfet
Copy link
Contributor Author

malfet commented Jul 20, 2024

@pytorchbot rebase

@pytorchmergebot
Copy link
Collaborator

@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here

@pytorchmergebot
Copy link
Collaborator

Successfully rebased malfet-patch-4 onto refs/remotes/origin/viable/strict, please pull locally before adding more changes (for example, via git checkout malfet-patch-4 && git pull --rebase)

@malfet malfet changed the title Build sccache from source for CPU targets Upgrade sccache to v0.8.2 for CPU targets Oct 29, 2024
@malfet
Copy link
Contributor Author

malfet commented Oct 29, 2024

@pytorch merge -f "Let's test in trunk!!!"

@malfet
Copy link
Contributor Author

malfet commented Oct 29, 2024

@pytorchbot merge -f "Let's test in trunk!!!"

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use -f as last resort and instead consider -i/--ignore-current to continue the merge ignoring current failures. This will allow currently pending tests to finish and report signal before the merge.

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 pushed a commit that referenced this pull request Nov 5, 2024
Fix a regression caused by #121323
Works for #114850
Pull Request resolved: #139604
Approved by: https://github.com/atalman, https://github.com/malfet
rahulsingh-intel pushed a commit to rahulsingh-intel/pytorch that referenced this pull request Nov 5, 2024
This essentially reverts pytorch#95997 but switches to builds from source to official mozilla's sccache repo for CPU builds, except PCH one, see pytorch#139188
- Define `SCCACHE_REGION` for the jobs that needs it.
- Enable aarch64 builds to use sccache, which allows one to do incremental rebuilds under 10 min, see https://github.com/pytorch/pytorch/actions/runs/11565944328/job/32197278296

Fixes pytorch#121559
Pull Request resolved: pytorch#121323
Approved by: https://github.com/atalman
pytorchmergebot pushed a commit that referenced this pull request Dec 11, 2024
Instead of an ancient prebuilt binary

This is a followup from #121323
For some reason, newer `sccache` does not work when `gcc` is invoked with `-E` option, so one have to special-case `-E` case in `/opt/ccache/bin/gcc` wrapper, which had to be special cased to work with  `nvcc` by checking whether `-E` is passed not only as first or second, but as 3rd argument as well(to be followed up by a generic #142813 ), i.e. to generate following wrapper:
```shell
#!/bin/sh

if [ "$1" = "-E" ] || [ "$2" = "-E" ] || [ "$3" = "-E" ]; then
  exec /usr/bin/gcc "$@"
elif [ $(env -u LD_PRELOAD ps -p $PPID -o comm=) != sccache ]; then
  exec sccache /usr/bin/gcc "$@"
else
  exec /usr/bin/gcc "$@"
fi
```

Without it `sccache nvcc hello.cu` failed with no-descriptive
```
    sccache: error: failed to execute compile
    sccache: caused by: Compiler not supported: ""
```
Pull Request resolved: #140614
Approved by: https://github.com/wdvr

Co-authored-by: Wouter Devriendt <wouterdevriendt@meta.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ciflow/linux-aarch64 linux aarch64 CI workflow ciflow/trunk Trigger trunk jobs on your pull request Merged topic: not user facing topic category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[aarch64 linux ci] missing sccache binaries for aarch64 linux platform
6 participants