Skip to content

Move SASS diff description to a SKILL#9767

Open
bernhardmgruber wants to merge 2 commits into
NVIDIA:mainfrom
bernhardmgruber:sass_diff_skill
Open

Move SASS diff description to a SKILL#9767
bernhardmgruber wants to merge 2 commits into
NVIDIA:mainfrom
bernhardmgruber:sass_diff_skill

Conversation

@bernhardmgruber

Copy link
Copy Markdown
Contributor

Fixes: #7829

@github-project-automation github-project-automation Bot moved this to Todo in CCCL Jul 9, 2026
@cccl-authenticator-app cccl-authenticator-app Bot moved this from Todo to In Review in CCCL Jul 9, 2026
@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 2636a2b9-64d8-490f-849b-d62a98bcba97

📥 Commits

Reviewing files that changed from the base of the PR and between f956a5f and 9a3165a.

📒 Files selected for processing (3)
  • .agent/skills/sass-diff/SKILL.md
  • .claude/skills/sass-diff/SKILL.md
  • AGENTS.md
💤 Files with no reviewable changes (1)
  • AGENTS.md
✅ Files skipped from review due to trivial changes (2)
  • .claude/skills/sass-diff/SKILL.md
  • .agent/skills/sass-diff/SKILL.md

📝 Walkthrough

Summary by CodeRabbit

  • Documentation
    • Added a new guide for comparing CUDA SASS/PTX outputs, including recommended tooling, required inputs, and rules to ignore common noise (e.g., addresses/build metadata/timestamps).
    • Updated the skills documentation to reference the shared guide for SASS diffs.
    • Removed outdated SASS-diff instructions from the main agent documentation so guidance is centralized.

Walkthrough

Adds a new skill file for SASS/PTX diff checks, links it from the Claude skills path, and removes the old SASS Diffs section from AGENTS.md.

Changes

SASS diff skill relocation

Layer / File(s) Summary
New sass-diff skill spec and symlink, AGENTS.md cleanup
.agent/skills/sass-diff/SKILL.md, .claude/skills/sass-diff/SKILL.md, AGENTS.md
Adds a new skill spec covering inputs, normalization, comparison, and reporting rules for SASS/PTX diffs; creates a symlink in the Claude skills directory pointing to the new file; removes the equivalent SASS Diffs section from AGENTS.md.

Assessment against linked issues

Objective Addressed Explanation
Move SASS diff instructions from AGENTS.md into a SKILLS.md-style skill file [#7829]
Expose the instructions as a separately addressable skill [#7829]

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2


ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 80db501d-a267-462f-ad53-e71ae893129b

📥 Commits

Reviewing files that changed from the base of the PR and between f51b10a and f956a5f.

📒 Files selected for processing (3)
  • .agent/skills/sass-diff/SKILL.md
  • .claude/skills/sass-diff/SKILL.md
  • AGENTS.md
💤 Files with no reviewable changes (1)
  • AGENTS.md

Comment on lines +15 to +24
## Inputs to establish

* Compiled binary under test
* The CUDA SM architectures to compile for. Try to detect this from the code and offer the user a list of suggestions.
The user must conform or provide this list.
* Baseline disassembly (from the previous commit/branch or the current commit without the changes in the working copy).
* Comparison disassembly (form the current commit/branch or the current commit with the changes in the working copy).
* By default, prefer `cuobjdump -sass` to inspect SASS changes.
Use `cuobjdump -ptx` if the request is to check for PTX changes instead.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

important: This still starts from prebuilt disassemblies. The issue requires the skill to take baseline and modified CUDA sources plus a target SM, compile both with the same nvcc flags, and then diff the cuobjdump output; otherwise agents can compare non-equivalent artifacts.

🧰 Tools
🪛 LanguageTool

[grammar] ~21-~21: Ensure spelling is correct
Context: ...orking copy). * Comparison disassembly (form the current commit/branch or the curren...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

Comment on lines +43 to +50
## Reporting

* If any non-trivial change was detected, the top 5 regions where a non-trivial change was detected,
including the name of the kernel they appeared in.
* A short summary of the diff type (opcode change, memory access size change, size delta, control-flow, etc.).
* Explicitly state if only noise was detected after normalization.
* If you are not sure if the differences are impactful, show it and ask the user for guidance.
* Keep the disassembly dumps available for reference and show the command to the user to generate a diff.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🚀 Performance & Scalability | 🟠 Major | ⚡ Quick win

important: The reporting section is missing the required performance regressions. Add explicit register-count and occupancy deltas to the summary so those regressions are surfaced instead of normalized away.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Note #9750 symlinks the whole folder (and is just waiting on fixes in #9754 to merge)

Comment on lines +27 to +33
Apply these transforms to both baseline and candidate listings before diffing.
Write the normalized listings to separate files.

* Remove addresses/offsets/hex location prefixes.
* Remove build IDs, timestamps, absolute paths, temp directories, and compiler banners.
* Normalize whitespace and alignment to single spaces.
* Remove empty lines and purely comment lines.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

IME these skills work much better if the agent has a set of scripts they can run that do these highly deterministic things for them. You should ask the bot to generate such a script for you and check it in with the skill.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

+1. Otherwise, the agent needs to write the script every time

Comment on lines +18 to +19
* The CUDA SM architectures to compile for. Try to detect this from the code and offer the user a list of suggestions.
The user must confirm or provide this list.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I would note that the bot should also check the compile_commands.json to get a definitive answer for this. The architectures will be listed explicitly in the compiler flags.

Comment on lines +25 to +41
## Normalization rules (strip known noise)

Apply these transforms to both baseline and candidate listings before diffing.
Write the normalized listings to separate files.

* Remove addresses/offsets/hex location prefixes.
* Remove build IDs, timestamps, absolute paths, temp directories, and compiler banners.
* Normalize whitespace and alignment to single spaces.
* Remove empty lines and purely comment lines.

## Comparison rules (what matters)

Ignore as trivial:

* Register renaming with identical instruction sequence and operands.
* Pure label renumbering or reordering of identical basic blocks.
* Formatting-only differences or reordered symbol tables.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can we add a checked-in normalization script so agents do not rewrite this logic each time?

I use something like this (also agent-generated but it works for me so far).

Comment on lines +18 to +19
* The CUDA SM architectures to compile for. Try to detect this from the code and offer the user a list of suggestions.
The user must confirm or provide this list.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
* The CUDA SM architectures to compile for. Try to detect this from the code and offer the user a list of suggestions.
The user must confirm or provide this list.
* The CUDA SM architectures to compile for. Try to detect this from the code and offer the user a list of suggestions.
The user must confirm or provide this list.
* Prefer `compile_commands.json` when available to recover the actual `nvcc` flags and `--generate-code` / `-arch` settings.


* If any non-trivial change was detected, the top 5 regions where a non-trivial change was detected,
including the name of the kernel they appeared in.
* A short summary of the diff type (opcode change, memory access size change, size delta, control-flow, etc.).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
* A short summary of the diff type (opcode change, memory access size change, size delta, control-flow, etc.).
* A short summary of the diff type, including opcode changes, memory access size/cache policy changes, control-flow changes, register-count changes, spills/local memory, shared memory, and occupancy-relevant resource deltas.

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

Labels

None yet

Projects

Status: In Review

Development

Successfully merging this pull request may close these issues.

Move SASS diff instructions from AGENTS.md to SKILLS.md

4 participants