#2862·sccache

nvcc: `Missing "cubin" file output` for a PTX-only compute_90 gencode (0.18.0)

Author: badbat75Created Sep 18, 2026Updated Sep 18, 2026

With sccache 0.18.0 wrapping nvcc, any compile with a PTX-only compute_90 gencode fails before anything is cached:

sccache: error: Failed to generate compile commands
sccache: caused by: Failed to generate compile commands
sccache: caused by: Missing "cubin" file output

This hits llama.cpp's default CUDA architecture list (75-virtual;80-virtual;86-real;89-real;90-virtual;120a-real;121a-real), so every file of its CUDA backend fails. The fatbinary failure we had through 0.17.0 is gone in 0.18.0 (#2722, #2811); this is the step right after it.

Minimal repro (trivial kernel):

sccache nvcc -c k.cu -o k.obj "--generate-code=arch=compute_90,code=[compute_90]"

The same command with compute_80 passes. Fails with nvcc 13.3 and 13.4, in client-side mode (SCCACHE_CLIENT_SIDE=1) and in server mode. Bisected on the full ggml-cuda compile line: dropping the compute_90 PTX gencode is the only change that makes it pass; the SASS archs (86, 89, 120a, 121a), compute_75/compute_80 PTX, -compress-mode=size and escaped-quote defines all go through.

Cause: for a PTX-only compute_90 target nvcc runs ptxas as a syntax check, with no -o:

#$ ptxas -arch=compute_90 -m64 "C:/Users/.../tmpxft_..._k.ptx"

(there is no such step for compute_80), and sccache treats every ptxas step as cacheable, which requires an output. #2809 describes exactly this and routes the step to the non-cacheable path; it is green but unreviewed. Could it be considered for the next release?

Environment: sccache 0.18.0 (x86_64-pc-windows-msvc release zip), Windows 11, CUDA 13.3.33 and 13.4.59, host compiler MSVC 14.51.