allow -E to be in any spot in the compiler command#142813
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/142813
Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 New FailureAs of commit 12f8d98 with merge base 393cf46 ( NEW FAILURE - The following job has failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
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>
|
@pytorchmergebot rebase main |
|
❌ 🤖 pytorchbot command failed: Try |
|
@pytorchbot -h rebase |
|
@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here |
|
Successfully rebased |
6e78185 to
b67a07f
Compare
|
@pytorchbot merge -f "If it works for pull, will work for trunk as well" |
Merge startedYour change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Follow up of TODO in #140614
It was found experimentally, that for one GPU architecture,
sccachepasses-Eas 1st, 2nd or 3rd argument, but it's much better to do this if-Eis passed as any argumentNo need to worry about exit or elif chains, as
execaborts script execution