Skip to content

Fix ccache for GPU, Metal, and Windows CI builds (#5174)#5174

Open
mnorris11 wants to merge 1 commit intofacebookresearch:mainfrom
mnorris11:export-D103482603
Open

Fix ccache for GPU, Metal, and Windows CI builds (#5174)#5174
mnorris11 wants to merge 1 commit intofacebookresearch:mainfrom
mnorris11:export-D103482603

Conversation

@mnorris11
Copy link
Copy Markdown
Contributor

@mnorris11 mnorris11 commented May 2, 2026

Summary:

Fix ccache configuration to actually achieve cache hits across CI runs:

  1. (P0) Configure ccache sloppiness for CUDA/ROCm builds — without hash_dir=false and relaxed sloppiness settings, nvcc/hipcc absolute paths cause 100% cache misses even when source is unchanged.
  2. (P1) Add missing -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache to the Metal build step, which had its own cmake invocation that was missed in D102926935.
  3. (P2) Increase cache size from 2G to 4G for GPU builds since CUDA object files are significantly larger.
  4. (P3) Add ccache to the Windows build in build-pull-request.yml, which uses inline build steps instead of the build_cmake composite action.

Differential Revision: D103482603

@meta-cla meta-cla Bot added the CLA Signed label May 2, 2026
@meta-codesync
Copy link
Copy Markdown
Contributor

meta-codesync Bot commented May 2, 2026

@mnorris11 has exported this pull request. If you are a Meta employee, you can view the originating Diff in D103482603.

@meta-codesync meta-codesync Bot changed the title Fix ccache for GPU, Metal, and Windows CI builds Fix ccache for GPU, Metal, and Windows CI builds (#5174) May 3, 2026
mnorris11 pushed a commit to mnorris11/faiss that referenced this pull request May 3, 2026
Summary:

Fix ccache configuration to actually achieve cache hits across CI runs:

1. (P0) Configure ccache sloppiness for CUDA/ROCm builds — without `hash_dir=false` and relaxed sloppiness settings, nvcc/hipcc absolute paths cause 100% cache misses even when source is unchanged.
2. (P1) Add missing `-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache` to the Metal build step, which had its own cmake invocation that was missed in D102926935.
3. (P2) Increase cache size from 2G to 4G for GPU builds since CUDA object files are significantly larger.
4. (P3) Add ccache to the Windows build in build-pull-request.yml, which uses inline build steps instead of the build_cmake composite action.

Differential Revision: D103482603
@mnorris11 mnorris11 force-pushed the export-D103482603 branch from a77f60f to 484095a Compare May 3, 2026 03:38
Summary:

Fix ccache configuration to actually achieve cache hits across CI runs:

1. (P0) Configure ccache sloppiness for CUDA/ROCm builds — without `hash_dir=false` and relaxed sloppiness settings, nvcc/hipcc absolute paths cause 100% cache misses even when source is unchanged.
2. (P1) Add missing `-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache` to the Metal build step, which had its own cmake invocation that was missed in D102926935.
3. (P2) Increase cache size from 2G to 4G for GPU builds since CUDA object files are significantly larger.
4. (P3) Add ccache to the Windows build in build-pull-request.yml, which uses inline build steps instead of the build_cmake composite action.

Differential Revision: D103482603
@mnorris11 mnorris11 force-pushed the export-D103482603 branch from 484095a to af91c82 Compare May 4, 2026 03:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant