Skip to content

Commit

Permalink
even more bf16-accumulation relaxation
Browse files Browse the repository at this point in the history
Signed-off-by: Benoit Jacob <jacob.benoit.1@gmail.com>
  • Loading branch information
bjacob committed Oct 9, 2024
1 parent 604ce0d commit 654c4c3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/testing/e2e/test_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,8 @@ bool iree_test_utils_result_elements_agree(iree_test_utils_e2e_value_t expected,
// compares.
float actual_f32 = iree_math_bf16_to_f32(actual.bf16_u16);
float expected_f32 = iree_math_bf16_to_f32(expected.bf16_u16);
if (fabsf(actual_f32) > 255.0f || fabsf(expected_f32) > 255.0f) {
if (fabsf(actual_f32 - expected_f32) < 8.0f) {
if (fabsf(actual_f32) > 127.0f || fabsf(expected_f32) > 127.0f) {
if (fabsf(actual_f32 - expected_f32) < 10.0f) {
return true;
}
}
Expand Down

0 comments on commit 654c4c3

Please sign in to comment.