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

[BUG]: sccache is causing mis-compiles #3103

Open
1 task done
ericniebler opened this issue Dec 9, 2024 · 1 comment
Open
1 task done

[BUG]: sccache is causing mis-compiles #3103

ericniebler opened this issue Dec 9, 2024 · 1 comment
Assignees
Labels
bug Something isn't working right. infrastructure Shared CMake, github, etc infrastructure

Comments

@ericniebler
Copy link
Collaborator

Is this a duplicate?

Type of Bug

Silent Failure

Component

Not sure

Describe the bug

if a test is added/changed by changing code guarded by #ifndef __CUDA_ARCH__, sccache will conclude that the file has not changed and will serve up a cached object file instead of compiling from source.

sccache uses a hash of the preprocessed source to determine whether or not to rebuild. the preprocessor is run with __CUDA_ARCH__ defined. All code guarded by #ifndef __CUDA_ARCH__ gets thrown away.

How to Reproduce

within a properly set up devcontainer (which uses sccache) add a TEST_CASE to an existing test, and guard it with #ifndef __CUDA_ARCH__. build and run the test. then change the test so that it will fail. build and run the test again. the test still passes.

Expected behavior

any changes to the source should cause recompilation, regardless of where the change is made.

Reproduction link

No response

Operating System

No response

nvidia-smi output

No response

NVCC version

No response

@trxcllnt
Copy link
Member

Fix is in mozilla/sccache#2300

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working right. infrastructure Shared CMake, github, etc infrastructure
Projects
Status: Todo
Development

No branches or pull requests

2 participants