Profile and optimize FLA kernels on NVIDIA GPUs, with same-hardware benchmarks and targeted Nsight Compute analysis.
87%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Passed
No findings from the security scan
Use this skill for NVIDIA kernel optimization and backend tuning. Follow CONTRIBUTING for correctness and performance evidence, and fla-optimization-loop for sustained iteration.
Use datacenter NVIDIA GPUs with sm_90 or newer for PR performance conclusions; H100 and H20 are accepted, and sm_100/sm_103 are preferred. Results from A100, older GPUs, or consumer cards are supplementary. Record the exact GPU and software versions with each comparison.
profile/<run_name>/.Run from the repository root. Resolve the baseline to a commit SHA before comparing:
FLA_BENCH_BASE=$(git rev-parse origin/main)
FLA_CI_ENV=0 python -m benchmarks.ops.verify --op chunk_kda --base "$FLA_BENCH_BASE"
python benchmarks/benchmark_training_throughput.py --name kda --batch_size 2 --seq_len 8192
python benchmarks/benchmark_training_throughput.py --name kda --batch_size 2 --seq_len 8192 --varlenThe verification command runs the current tests; retain the validated baseline and tests yourself. A selected subset is useful during iteration but does not replace the full relevant gate before reporting a gain.
Collect a representative changed kernel with the installed ncu. Check which sections and metrics that version supports.
The benchmark runner launches a child process, so use --target-processes all. Replace the kernel filter with the changed kernel's name. --no-base profiles the current implementation; collect the baseline separately with the same command and workload.
mkdir -p profile/kda
ncu --target-processes all --set full \
-k 'regex:chunk_kda' -c 1 -o profile/kda/full \
python -m benchmarks.ops.run --op chunk_kda --modes fwd --no-base
ncu --target-processes all --set source --section SourceCounters \
-k 'regex:chunk_kda' -c 1 -o profile/kda/source \
python -m benchmarks.ops.run --op chunk_kda --modes fwd --no-baseUse duration, memory throughput, occupancy, stalls, and hot instructions to explain the bottleneck. Profiling overhead makes these runs unsuitable as the latency comparison; use the synchronized benchmark for that measurement.
fla-org/flash-linear-attention
9819311
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.