-
Notifications
You must be signed in to change notification settings - Fork 98
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 #364
base: master
Are you sure you want to change the base?
Conversation
A start at "extensive" tests that run up to # Run one or more exhaustive test
LIBM_EXTENSIVE_TESTS=sinf,cosf cargo t --features test-multiprecision --release -- extensive
# Run all `f32` or `f64` tests
LIBM_EXTENSIVE_TESTS=all_f32 cargo t --features test-multiprecision --release -- extensive
# Run everything
LIBM_EXTENSIVE_TESTS=all cargo t --features test-multiprecision --release -- extensive For single-arg I ran a handful of tests on my 24-core machine, the current setup with Rayon ranges about 10m-1h depending on the test. That can probably be improved, I haven't looked at this from a perf perspective at all (though one thing I noticed quickly from htop is there is a lot of time spent in kthreads, maybe I need to double check if Rayon is doing batching). After I get this a bit better sorted out, I am going to hook up CI to run relevant tests when source files change. Current state is very scratchy. @beetrees you may be interested since I know you suggested this a few times. |
I'm using the mimic harness so I can skip tests at runtime and show a progress bar, sample output.
|
Way faster with chunking, |
ee66993
to
6da3286
Compare
b0ace52
to
233f651
Compare
Add a constant for negative pi and provide a standalone const `from_bits`, which can be combined with what we already had in `hex_float`. Also provide another default method to reduce what needs to be provided by the macro.
Introduce `f8`, which is an 8-bit float compliant with IEEE-754. This type is useful for testing since it is easily possible to enumerate all values.
Create a type representing a function's domain and a test that does a logarithmic sweep of points within the domain.
Introduce a generator that will tests various points of interest including zeros, infinities, and NaNs.
For visualization, add a simple script for generating scatter plots and a binary (via examples) to plot the inputs given various domains.
This will enable us to `include!` the file to access these types in `libm-test`, rather than somehow reproducing the types as part of the macro. Ideally `libm-test` would just `use` the types from `libm-macro` but proc macro crates cannot currently export anything else. This also adjusts naming to closer match the scheme described in `libm_test::op`.
These types from `libm_macros` provide a way to get information about an operation at runtime, rather than only being encoded in the type system. Include the file and reexport relevant types.
New API to support upcoming tests.
Rather than passing names or identifiers, just pass `CheckCtx` in a few more places.
f2a17f9
to
3b82822
Compare
Builds on top of #348 so it includes those commits.