Select and run correctness coverage for FLA kernels and modules, including gradients, dispatch boundaries, and Triton addressing changes.
76%
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
Fix and improve this skill with Tessl
tessl review fix ./.agents/skills/fla-correctness-coverage/SKILL.mdUse fla-design-coverage when the change needs a new numerical or routing contract. This skill turns that contract into tests; CONTRIBUTING.md defines references, tolerances, test structure, and platform conventions.
Read the affected tests and callers before adding cases. Follow test organization and naming: try the existing parameter matrix first, and add a function or file only when its setup or scope requires one. Cover reachable gaps across the applicable dimensions together, rather than testing each flag only in isolation:
| Dimension | Cases that can expose different behavior |
|---|---|
| Layout | Dense and varlen, partial chunks, long sequences, asymmetric QK/value dimensions |
| Features | Gate bounds, raw/post-sigmoid beta, QK normalization, grouped value attention |
| State | Initial state, final state, and state gradients where supported |
| Numerics | Supported dtypes, affected conversion/reduction paths, numerical boundaries |
| Routing | Default and selected backends, verifier acceptance, rejection, and fallback |
Compare outputs and final states against the existing reference. Training APIs also need every supported gradient; forward-only APIs must state that backward is unsupported. Use torch.autograd.gradcheck where the implementation supports its required precision. Routing tests verify selection and argument forwarding; they do not replace numerical comparisons on the actual backend.
For addressing changes, inspect casts before multiplication and test shapes that expose large offsets, partial tiles, and varlen boundaries. Follow the tl.int64 and platform requirements in Triton Kernels. Exercise changed grid/address paths on affected supported platforms. Distinguish unsupported cases from tests skipped for unavailable hardware or dependencies; record the latter as validation gaps.
The NaN allocation guard covers eligible FLA allocations in operator/module tests, including the single-rank CP graph and intra-card cache cases moved from operator tests, but not layer/model tests, spawned CP workers, or every allocation. Add explicit finite-output and finite-gradient checks to adversarial cases, and investigate a poisoned-run failure even when an ad hoc run passes.
Discover dependent tests from the repository root:
python scripts/find_dependent_tests.py fla/ops/kda/chunk.py
FLA_CI_ENV=0 pytest tests/ops/test_kda.py -vThe helper lists files; it does not run them. Include reported callers and relevant tests/modules/, tests/layers/, tests/models/, or tests/cp/ coverage when the change reaches those paths. Inspect skips and warning-only comparisons before calling the run a pass. Record commands, backend flags, environment, and results; reproduce failures on the unchanged baseline before labeling them pre-existing.
Read operator math only when needed: Delta Rule, Generalized Delta Rule, Simple GLA, or context parallelism.
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.