Repository navigation
ukernel test improvements - #15542
Merged
Merged
Conversation
bjacob
force-pushed
the
bjacob-ukernel-test-improvements
branch
from
November 10, 2023 20:16
0cfef67 to
2fe4ae1
Compare
bjacob
marked this pull request as ready for review
November 10, 2023 20:43
Collaborator
Author
|
PTAL @benvanik |
benvanik
approved these changes
Nov 14, 2023
ramiro050
pushed a commit
to ramiro050/iree
that referenced
this pull request
Dec 19, 2023
* 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 iree-org#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 (iree-org#15525).
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.
bf16 * bf16 -> bf16optimized tile functions for x86 and arm64. #15543 as I'm adding bf16-accumulator tile functions that are skipping intermediate roundings.iree-e2e-matmul-testto switch to skipping intermediate roundings. Unlike the ukernels' own tests, which really must test both flavors, iniree-e2e-matmul-testwe 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.i16 x u4 -> i32on AVX-512-VNNI #15525).