debug-compiler
Skill1 starsChanged 2 months agoApache-2.0View on GitHub
Diagnose Buckyball model import, graph transformation, MLIR lowering, layout, bank allocation, and compiler performance failures. Use when the failure precedes emulator or RTL execution.
In this repository25 other files it gives its agents.
- agent-runtimeSkill
- ball-alignSkill
- canvas-clientSkill
- checkSkill
- chip-designerSkill
- collaboration-panelSkill
- debug-bemuSkill
- debug-p2eSkill
- debug-performanceSkill
- debug-verilatorSkill
- domain-modelingSkill
- graph-contractSkill
- grillingSkill
- grill-with-docsSkill
- ip-designerSkill
- model-optimizeSkill
- model-portSkill
- model-recipeSkill
- plugin-verifySkill
- programming-principlesSkill
- repo-installSkill
- reportSkill
- role-identitySkill
- waveformSkill
- workload-testsSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 5 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Verify the original model and chip rewrite separately.
- Distinctive: line 14
Follow parameter identity/order through import and packing.
- Very specific: line 16
Before adding a high-rank transpose, test whether aligned layouts or offline weight permutation remove it.
- Distinctive: line 18
Use actual compute-bank dimensions.
- Distinctive: line 28
Verify physical padding and logical trimming independently.
- Distinctive: line 38
Do not adjust output comparisons or the golden model to conceal a mismatch.
- Very specific: line 40
Use project MCP build tools.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Compiler Debugging
Locate the first failing stage: model rewrite, graph import/grouping, quantization, layout, dialect verification, bank lowering/allocation, LLVM IR, or machine code. Retain the exact command, input graph, target configuration, and first diagnostic.
- Verify the original model and chip rewrite separately. Quantization must not hide a changed preprocessing, pooling, bias, reduction, or flattening contract.
- Follow parameter identity/order through import and packing; inspect shapes, strides, dtypes, scales, and producer/consumer layouts at the failing boundary.
- Before adding a high-rank transpose, test whether aligned layouts or offline
weight permutation remove it. Put model layout decisions in
permute/. - Use actual compute-bank dimensions. Reduce tiles or split reduction/graph regions when the design exceeds them; do not silently enlarge capacity.
- A fused region can recursively recompute its producers. Inspect its lowering and materialization boundaries when IR size or runtime work grows sharply.
- For a performance target, use
$debug-performance. Preserve fixed argument strides with dynamic offsets into packed payloads; forcing offset zero can make direct DMA read the wrong weights. Tile capacity must also respect ISA row bases. - Distinguish DMA-loaded storage from recursively assembled scratch tiles. A narrow row-base field can limit scratch assembly without limiting a whole-bank DMA load; applying one conservative limit to every path can break valid larger-bank users.
- Verify physical padding and logical trimming independently. Calibration hooks must see the physical Linear/Conv channels before a wrapper trims the output; retain the original model as the reference for logical outputs.
- For a slow compilation, inspect the live process/pass before assuming a hang. Preserve intermediate MLIR/LLVM IR when useful. Fix graph/lowering expansion before accumulating optimization-disable flags; validate any retained tradeoff.
Reproduce a semantic defect with a small independent C/MLIR case, fix the red stage, and run it plus affected existing cases. A lowering marker's indexing map can be consumed by a later pass; inspect that consumer before changing the map. Do not adjust output comparisons or the golden model to conceal a mismatch.
Use project MCP build tools. With user-authorized fallback, use
nix develop -c bbdev; report logs/exit status. Distinguish an environment/source
packaging error from a compiler defect. Nix Git-source packaging can omit a new
untracked file that local compilation sees; inspect inclusion before altering code.
Once compilation is green, continue with BEMU and $debug-bemu as needed.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

