8000 Add relative error for buffer comparison by nirvedhmeshram · Pull Request #19464 · iree-org/iree · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add relative error for buffer comparison #19464

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

Merged
merged 5 commits into from
Apr 30, 2025

Conversation

nirvedhmeshram
Copy link
Contributor

For large values using relative error for buffer comparison can be helpful as shown by the CompareElementwiseF16NearEQRelative test

@benvanik
Copy link
Collaborator

looks like there are some test failures:

[ RUN      ] BufferViewMatchersTest.CompareElementwiseF16NearEQRelative
iree/runtime/src/iree/tooling/buffer_view_matchers_test.cc:459: Failure
Value of: iree_hal_compare_buffer_elements_elementwise( kApproximateRelativeEquality, IREE_HAL_ELEMENT_TYPE_FLOAT_16, (sizeof(lhs) / sizeof(lhs[0])), iree_make_const_byte_span(lhs, sizeof(lhs)), iree_make_const_byte_span(rhs, sizeof(rhs)), &index)
  Actual: false
Expected: true

Once fixed this LGTM!

nirvedhmeshram and others added 4 commits April 30, 2025 11:33
Signed-off-by: Nirvedh <nirvedh@gmail.com>
Signed-off-by: Nirvedh <nirvedh@gmail.com>
Signed-off-by: Nirvedh <nirvedh@gmail.com>
Signed-off-by: Nirvedh <nirvedh@gmail.com>
@nirvedhmeshram nirvedhmeshram merged commit 852da17 into iree-org:main Apr 30, 2025
41 checks passed
nirvedhmeshram added a commit that referenced this pull request May 6, 2025
For large values using relative error for buffer comparison can be
helpful as shown by the `CompareElementwiseF16NearEQRelative` test

---------

Signed-off-by: Nirvedh <nirvedh@gmail.com>
Co-authored-by: Ben Vanik <ben.vanik@gmail.com>
KyleHerndon pushed a commit to KyleHerndon/iree that referenced this pull request May 7, 2025
For large values using relative error for buffer comparison can be
helpful as shown by the `CompareElementwiseF16NearEQRelative` test

---------

Signed-off-by: Nirvedh <nirvedh@gmail.com>
Co-authored-by: Ben Vanik <ben.vanik@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0