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. #34

Closed
wants to merge 1 commit into from

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
Copy link
Author

Not needed. Hoping to get : microsoft#20520 upstream or will cherry-pick patch upcoming branches if needed if this doesn't get in

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
1 participant