CtrlK
BlogDocsLog inGet started
Tessl Logo
SkillPublic

fla-correctness-coverage

Select and run correctness coverage for FLA kernels and modules, including gradients, dispatch boundaries, and Triton addressing changes.

Quality

76%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide
SecuritybySnyk

Passed

No findings from the security scan

Fix and improve this skill with Tessl

tessl review fix ./.agents/skills/fla-correctness-coverage/SKILL.md
SKILL.md
Quality
Evals
Security

FLA Correctness Coverage

Use 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.

Select coverage

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:

DimensionCases that can expose different behavior
LayoutDense and varlen, partial chunks, long sequences, asymmetric QK/value dimensions
FeaturesGate bounds, raw/post-sigmoid beta, QK normalization, grouped value attention
StateInitial state, final state, and state gradients where supported
NumericsSupported dtypes, affected conversion/reduction paths, numerical boundaries
RoutingDefault 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.

Run the affected paths

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 -v

The 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.

Repository

fla-org/flash-linear-attention

Path

.agents/skills/fla-correctness-coverage/SKILL.md

Last updated
First committed

Is this your skill?

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.