mozilla / mozilla/sccache

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

Open
#2,862 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
7.7k
Forks
748
Avg merge
4d 7h
Merged PRs (30d)
21

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the compile-command handling described in #2809 and reproduce the minimal nvcc command using a PTX-only compute_90 gencode. Trace the ptxas syntax-check step that has no output, then verify the command no longer reports a missing cubin and that the existing cacheable steps still work.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.