Skip to content

Only set fast math contract flag for Add/Mul operators #4197

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 1 commit into from
May 14, 2025

Conversation

whitneywhtsang
Copy link
Contributor

Fixes #4185.

@whitneywhtsang whitneywhtsang merged commit 0ca38b7 into main May 14, 2025
15 checks passed
@whitneywhtsang whitneywhtsang deleted the whitneywhtsang/contract branch May 14, 2025 01:39
@anmyachev
Copy link
Contributor

@whitneywhtsang should we add test?

@whitneywhtsang
Copy link
Contributor Author

@whitneywhtsang should we add test?

Not sure how to add test for functions in triton_xpu.cc, do you have suggestions?

@anmyachev
Copy link
Contributor

@whitneywhtsang should we add test?

Not sure how to add test for functions in triton_xpu.cc, do you have suggestions?

Maybe add a test with PyTorch asin operation to the regression tests?

@whitneywhtsang
Copy link
Contributor Author

@whitneywhtsang should we add test?

Not sure how to add test for functions in triton_xpu.cc, do you have suggestions?

Maybe add a test with PyTorch asin operation to the regression tests?

Sure, will work on that.

whitneywhtsang added a commit that referenced this pull request May 14, 2025
Signed-off-by: Whitney Tsang <[email protected]>
@whitneywhtsang
Copy link
Contributor Author

Maybe add a test with PyTorch asin operation to the regression tests?

Sure, will work on that.

It is harder than expected to obtain a standalone test for this test case, as it contains 2 kernels. Will think about what else can be done to have a test case.

whitneywhtsang added a commit that referenced this pull request May 14, 2025
We should use `TRITON_DEFAULT_FP_FUSION` to disallow `mul+add->fma`
fusion.

Signed-off-by: Whitney Tsang <[email protected]>
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.

[PyTorch][Inductor] TestInductorOpInfoXPU.test_comprehensive_asin_xpu_float32
3 participants