Repository navigation
docs(pytorch): document the sccache compiler cache - #9560
subodh-dubey-amd wants to merge 2 commits into
Conversation
✅ All Checks Passed — Ready for Review
📖 Need help? See the Policy FAQ for details on every check and how to fix failures. |
|
🎉 All checks passed! This PR is ready for review. |
| - `--use-sccache` sets the CMake C/C++ compiler launchers and, on Linux, | ||
| `HIP_CLANG_LAUNCHER`, so hipcc also routes HIP device compiles through | ||
| sccache. |
There was a problem hiding this comment.
Ok to document what currently exists, but we should set -DCMAKE_HIP_COMPILER_LAUNCHER=ccache instead now, on both Linux and Windows. See #8824
We're missing out of a large number of potential cache hits with the current code here:
TheRock/build_tools/setup_sccache_rocm.py
Lines 93 to 98 in b690ead
See also the "Optimizing the PyTorch build" section on this recent comment of mine: #7346 (comment)
There was a problem hiding this comment.
I have a fix for this ready, preparing a PR now.
We'll just set all three compiler launchers on both platforms, as that works now. I'll also delete build_tools/setup_sccache_rocm.py for now since there's no meaningful logic left in the file now, but we can add it back later if we want to configure the remote cache server based on release type, job triggers, etc. in there.
| ### CI and release builds | ||
|
|
||
| The Linux and Windows wheel workflows default to `cache_type: sccache` | ||
| (`ccache` and `none` are also accepted) and store entries in S3, with a bucket | ||
| and an OIDC-assumed IAM role per release type (see | ||
| [cache buckets](/docs/development/s3_buckets.md#cache-buckets)): | ||
|
|
||
| | Builds | Bucket | Key prefix | | ||
| | ------- | ---------------------------------------- | ------------------------------------------------------ | | ||
| | CI | `therock-pytorch-sccache-ci` | `linux/<artifact_group>/`, `windows/<artifact_group>/` | | ||
| | Release | `therock-pytorch-sccache-<release_type>` | `linux/multiarch/v1/`, `windows/multiarch/v1/` | |
There was a problem hiding this comment.
Ok to document what exists, but we should complete the work and limit to always sscache. Keeping the multiple options was an experiment, and the experiment is over now :)
ISSUE ID : #9559
Motivation
Technical Details
external-builds/pytorch/README.md:--use-sccache/--use-ccacheand--sccache-no-wrap;compute_pytorch_cache_type.py).ccache_troubleshooting.mdcan point here.Test Plan
pre-commit run --files external-builds/pytorch/README.md.build_prod_wheels.py,setup_sccache_rocm.py,compute_pytorch_cache_type.py, the Linux and Windows PyTorch wheel workflows, ands3_buckets.md.Test Result
Submission Checklist