-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add exhaustive/extensive tests #388
Merged
Merged
Conversation
This file contains 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
This was referenced Jan 2, 2025
13b009c
to
3295bc4
Compare
3295bc4
to
1a91e87
Compare
b02ca43
to
d28f70c
Compare
1a91e87
to
ab5f7bd
Compare
d28f70c
to
e302812
Compare
ab5f7bd
to
f0c4aa3
Compare
c93054b
to
ac3ff8c
Compare
1e01833
to
66d061b
Compare
3f51474
to
a521311
Compare
Add a generator that will test all inputs for input spaces `u32::MAX` or smaller (e.g. single-argument `f32` routines). For anything larger, still run approximately `u32::MAX` tests, but distribute inputs evenly across the function domain. Since we often only want to run one of these tests at a time, this implementation parallelizes within each test using `rayon`. A custom test runner is used so a progress bar is possible. Specific tests must be enabled by setting the `LIBM_EXTENSIVE_TESTS` environment variable, e.g. LIBM_EXTENSIVE_TESTS=all_f16,cos,cosf cargo run ... Testing on a recent machine, most tests take about two minutes or less. The Bessel functions are quite slow and take closer to 10 minutes, and FMA is increased to run for about the same.
a521311
to
4985826
Compare
4985826
to
386c2be
Compare
I have been using this for a few weeks and it has worked pretty great. Going to merge this so the exhaustive CI checks become available for all PRs. |
Add a CI job with a dynamically calculated matrix that runs extensive jobs on changed files. This makes use of the new `function-definitions.json` file to determine which changed files require full tests for a routine to run.
386c2be
to
9b08ee5
Compare
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.
Add a generator that will test all inputs for input spaces
u32::MAX
or smaller (e.g. single-argumentf32
routines). For anything larger, still run approximatelyu32::MAX
tests, but distribute inputs evenly across the function domain.Since we often only want to run one of these tests at a time, this implementation parallelizes within each test using
rayon
. A custom test runner is used so a progress bar is possible.Specific tests must be enabled by setting the
LIBM_EXTENSIVE_TESTS
environment variable, e.g.Testing on a recent machine, most tests take about two minutes or less. The Bessel functions are quite slow and take closer to 10 minutes, and FMA is increased to run for about the same.
This uses the
libtest_mimc
harness so a progress bar can be printed. Example:Recreated from #364.