Skip to content

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

@ericniebler

Description

@ericniebler

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

Metadata

Metadata

Assignees

Labels

infraShared CMake, github, etc infrastructure

Type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions