Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sccache incorrectly yields hits for code guarded by #ifndef __CUDA_ARCH__ #2299

Closed
trxcllnt opened this issue Dec 21, 2024 · 0 comments · Fixed by #2300
Closed

sccache incorrectly yields hits for code guarded by #ifndef __CUDA_ARCH__ #2299

trxcllnt opened this issue Dec 21, 2024 · 0 comments · Fixed by #2300

Comments

@trxcllnt
Copy link
Contributor

First reported here: NVIDIA/cccl#3103

sccache is incorrectly yielding cache hits on code guarded by #ifndef __CUDA_ARCH__, e.g.:

#ifndef __CUDA_ARCH__
const auto x = "host-only code";
#endif

If the code inside the #ifndef changes, sccache yields a cache hit when it should've been a cache miss, because nvcc -E injects -D__CUDA_ARCH__ (and likely others like -D__CUDA_ARCH_LIST__) into the host preprocessor invocations.

This bug has existed from before I rewrote how sccache handles nvcc compilations.
Luckily, we can fix this because I rewrote how sccache handles nvcc compilations 🙂.

trxcllnt added a commit to trxcllnt/sccache that referenced this issue Dec 23, 2024
sylvestre pushed a commit that referenced this issue Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant