Skip to content
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 set_false_math to false to solve accuracy issue for gelu test. #32

Merged
merged 1 commit into from
Apr 30, 2024

Conversation

TedThemistokleous
Copy link

Patching in fast match disabled in the MIGraphX Compile stage in the MIGraphX EP

Description

Allow the MIGraphX API to compile the program given to the EP to turn off fast math by default.

Motivation and Context

Fixes accuracy issue we're seeing with GELU parity tests. Without fast math disabled GELU will use a faster but less numerically stable version which trades speed for accuracy.

Add ORT_MIGRAPHX_SET_FAST_MATH env option and api hooks

Allow users to set the fast math option for MIGraphX compilation for quantized data types (fp16)
This allows us to toggle whether we can use faster math with the tradeoff of accuracy.

Revert "fixup! Add ORT_MIGRAPHX_SET_FAST_MATH env option and api hooks"

This reverts commit d369a15.

Revert "Add ORT_MIGRAPHX_SET_FAST_MATH env option and api hooks"

This reverts commit 3819961.
@TedThemistokleous TedThemistokleous added the bug Something isn't working label Apr 30, 2024
@TedThemistokleous TedThemistokleous self-assigned this Apr 30, 2024
@jeffdaily jeffdaily merged commit 9c748d7 into rocm6.1_internal_testing Apr 30, 2024
12 of 22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix issue with fast_math in internal and upstream Onnxruntime MIGraphX EP
2 participants