Repository navigation
Test every precision-templated routine in double - #56
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes
Tests of precision-templated routines now run in
floatand indouble. The suite grows from 5,257 to 9,102 tests.--f64switch (glass_test_pop_f64intest/cuda/helpers.cuh) that selectsrun<double>; the Python side passesdtypethroughrun_op(DTYPES,f32exactintest/conftest.py).float32and the driver widens them exactly. The double reference is computed in float64 from those same values.copy,swap,transposeandiamaxalso run on native float64 operands whose values all round to 1.0 in float (--f64x,below_float). A mover must return them exactly, andiamaxmust find a maximum that ties in float and is not at index 0.What the gate shows
.github/scripts/precision_coverage.pyis a static inventory per function. It requires, for every documented function whose signature uses the precision type, a call that is compiled in double: one that namesdouble, or one inside a driver template reachable from a real<double>instantiation. It reads 408 of 408, with 7 exempt. It runs in CI and inrelease.sh..github/scripts/test_precision_coverage.pyholds the negative controls. Changing the L1 driver'srun<double>torun<float>drops every credit. Other cases cover a template never instantiated on double, macro-generated callees, a macro redefined after#undef, and a deduced launcher.Tolerances
Tolerances and references are set per operation. Most double results are held to 1e-10 to 1e-12 relative. The looser bounds are PCG (1e-9 relative plus a residual check), unpivoted LDLT (1e-9) and the Lie and geometry routines (1e-6 by default).
docs/source/user_guide/concepts/testing_oracles.rststates the rule.Float-only routines
Seven
glass::nvidia::block::routines have float bodies only (potrs,getrf_no_pivot,getrs_no_pivot,gesv_no_pivot,geqrf,gels,gemm_batched). They are listed with that reason underdouble_exemptintest/api-coverage-policy.json.Evidence
18cb7ab, 9,102 passed, verified locally withverify_desktop.sh.Not covered
test/expected_skips_sm72.txtneeds the new vendor test IDs.copy,swap,transposeandiamax.laswp, the strided movers and the block load and store are tested in double on float32 operands only.🤖 Generated with Claude Code