Guidelines for NVIDIA GPU kernel / Triton / Gluon / TileLang / CUDA backend performance work in the FLA repo. Covers profiling workflow, hardware baselines, and MR-ready performance evidence requirements. Uses an installed ncu-report-skill when a task needs detailed Nsight Compute collection and diagnosis.
67
80%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Use this skill when working on Triton, Gluon, TileLang, CUDA, or other NVIDIA GPU kernel optimizations,
backend tuning, or any change that could affect throughput or latency in fla/ops/ or related modules.
This repo intentionally does not vendor ncu-report-skill, add it as a submodule, or auto-clone it during agent work.
If a user-level ncu-report-skill is available, use it for:
full, source, PM sampling, source counters);If it is not available, use the minimal NCU commands in this skill and state in the MR notes that the external helper skill was unavailable. Do not create untracked external clones inside this repo unless the user explicitly asks.
benchmark_training_throughput.py or benchmark_generation.py
are enough to catch large regressions during development.An agent-authored MR that touches kernel code must include complete performance evidence:
Before / after benchmark
NCU profile
ncu with both --set full and --set source for a representative changed kernel
when Nsight Compute is available..ncu-rep locally; do not commit it to the repo.Workload coverage
Conclusion and risk
Store local profile artifacts under:
profile/<run_name>/For example:
profile/kda_chunk_bwd_20250603/
├── REPORT.md
├── reports/
│ ├── full_<tag>.ncu-rep
│ └── source_<tag>.ncu-rep
└── analysis/Keep .ncu-rep, .nsys-rep, and raw logs out of git.
# Op microbenchmark
python -m benchmarks.ops.run --op chunk_kda --modes fwd
# Model training benchmark
python benchmarks/benchmark_training_throughput.py \
--name kda --batch_size 2 --seq_len 8192
# Varlen training benchmark (if supported by the model/op path)
python benchmarks/benchmark_training_throughput.py \
--name kda --batch_size 2 --seq_len 8192 --varlen
# NCU full profile
ncu --set full --section PmSampling --section PmSampling_WarpStates \
-k "regex:<kernel_regex>" -c 1 \
-o profile/<run_name>/reports/full_<tag> \
python -m benchmarks.ops.run --op chunk_kda --modes fwd
# NCU source profile (for instruction-level analysis)
ncu --set source --section SourceCounters \
-k "regex:<kernel_regex>" -c 1 \
-o profile/<run_name>/reports/source_<tag> \
python -m benchmarks.ops.run --op chunk_kda --modes fwd27967b9
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.