-
Notifications
You must be signed in to change notification settings - Fork 650
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Consistently compare with/without skipping of intermediate roundings. A catch is that the ukernel may fall back to a generic code path (and that fallback is consistently exercised by the test, even when a non-fallback path is also available and tested). And generic code paths ("tile functions") never skipped intermediate roundings, even if allowed to by the flag. This caused complicated test code retrying again on error. This PR simply adds the skipping-intermediate-roundings generic tile functions, so the test code is simpler, and concretely I just needed that for #15543 as I'm adding bf16-accumulator tile functions that are skipping intermediate roundings. * I had to also update `iree-e2e-matmul-test` to switch to skipping intermediate roundings. Unlike the ukernels' own tests, which really must test both flavors, in `iree-e2e-matmul-test` we are e2e testing what the compiler produces, and that is skippig intermediate roundings at least by default, and while that could be overridden with `--iree-llvmcpu-skip-intermediate-roundings=false`, we don't currently test that in e2e matmul tests. * Generate better random test input values. Some were too large - when we generate random bfloat16 to accumulate into bfloat16, they better be very small as we don't want to grow accumulators to the point where they would start rounding. It's OK, because bfloat16 kernels use bfloat16 arithmetic instructions, not bit hacks, so correctness is sufficiently tested on very small values. Conversely, for int8/int16 test input values, we were generating a very narrow range and that was potentially missing important coverage as some of our int kernels are starting to do evil bit hacks (#15525).
- Loading branch information
Showing
5 changed files
with
143 additions
and
50 deletions.
There are no files selected for viewing
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 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 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 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 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