Skip to content

Fix nvcc dryrun parsing for CUDA 13.3#2722

Open
mbrobbel wants to merge 10 commits into
mozilla:mainfrom
mbrobbel:codex/nvcc-13.3-simt-only
Open

Fix nvcc dryrun parsing for CUDA 13.3#2722
mbrobbel wants to merge 10 commits into
mozilla:mainfrom
mbrobbel:codex/nvcc-13.3-simt-only

Conversation

@mbrobbel

Copy link
Copy Markdown

sccache assumed nvcc-generated cicc and ptxas inputs were always at a fixed offset near the end of the command line. With CUDA 13.3.33, cicc dryrun output can place --simt-only after the input file, which makes the old positional parser treat --simt-only as the input instead of kernel.cpp1.ii.

That can prevent sccache from grouping the cicc and ptxas device compilation steps correctly. Later, fatbinary fails because the expected .cubin files were never produced.

Changes

  • Find cicc inputs by .cpp1.ii extension instead of fixed position.
  • Find ptxas inputs by .ptx extension instead of fixed position.
  • Keep the old positional fallback for unexpected command shapes.
  • Add regression coverage for cicc input before --simt-only.
  • Add regression coverage for ptxas input detection by .ptx.
  • Add nvcc dryrun grouping coverage for CUDA 13.3-style --simt-only.

Comment thread src/compiler/cicc.rs Outdated
Comment thread src/compiler/cicc.rs
Comment on lines +44 to +53
pub(crate) const CICC_INPUT_SUFFIX: &str = ".cpp1.ii";
pub(crate) const PTXAS_INPUT_SUFFIX: &str = ".ptx";

pub(crate) fn is_cicc_input(arg: impl AsRef<OsStr>) -> bool {
arg.as_ref().to_string_lossy().ends_with(CICC_INPUT_SUFFIX)
}

pub(crate) fn is_ptxas_input(arg: impl AsRef<OsStr>) -> bool {
arg.as_ref().to_string_lossy().ends_with(PTXAS_INPUT_SUFFIX)
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does it have to be pub ?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are used in the nvcc module.

@codecov-commenter

codecov-commenter commented Jun 1, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.93048% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.78%. Comparing base (11a89f1) to head (3dd749c).
⚠️ Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
src/compiler/cicc.rs 96.61% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2722      +/-   ##
==========================================
+ Coverage   74.64%   74.78%   +0.14%     
==========================================
  Files          70       70              
  Lines       39893    40064     +171     
==========================================
+ Hits        29777    29961     +184     
+ Misses      10116    10103      -13     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@codspeed-hq

codspeed-hq Bot commented Jun 1, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 58 untouched benchmarks
⏩ 6 skipped benchmarks1


Comparing mbrobbel:codex/nvcc-13.3-simt-only (3dd749c) with main (11a89f1)

Open in CodSpeed

Footnotes

  1. 6 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@mbrobbel mbrobbel force-pushed the codex/nvcc-13.3-simt-only branch from be76bf6 to f90eeef Compare June 5, 2026 07:51
@mbrobbel mbrobbel force-pushed the codex/nvcc-13.3-simt-only branch from f90eeef to f713f8d Compare June 5, 2026 07:52
Comment thread Cargo.toml

[workspace.lints.clippy]
cloned_instead_of_copied = "warn"
cloned_ref_to_slice_refs = "warn"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please do that a in different PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants