ccache icon indicating copy to clipboard operation
ccache copied to clipboard

Ccache support for CUDA/HIP builds

Open t-a-james opened this issue 4 months ago • 1 comments

When compiling for GPU the preprocessor is run twice for each target: once for the host (CPU) and once for the device (GPU) code. Two object files are generated, then later linked together into a "fat binary" which contains both device- and host-side code.

GPU compile times can be orders of magnitude longer than CPU, so it would be great if ccache supported this pattern.

t-a-james avatar Oct 02 '25 13:10 t-a-james

This sounds very similar to #1131 except that the -arch option is not in play?

@t-a-james: Could you provide example command lines and/or a simple CMake project that can be used for reference?

jrosdahl avatar Oct 02 '25 16:10 jrosdahl