Skip to content

[FlexAttention] FlexDecoding accuracy discrepancy between XPU and CUDA while compiling torch.ops.higher_order.flex_attention #3588

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

Closed
hoshibara opened this issue Mar 3, 2025 · 3 comments

Comments

@hoshibara
Copy link

Describe the bug

Issue Description:
While running the XPU FlexDecoding UT, we found a test failure due to a tensor mismatch.

python test/inductor/test_flex_decoding.py TestFlexDecoding.test_paged_attention_page_size_float16_score_mod1_head_dims1_page_size_256

We captured the compiled results on both XPU and CUDA, unified their outputs, and found that running the Triton codes generated by UT will get different results.

triton-code.zip

Environment details

You can refer to this issue to setup a reproducing environment:
#3518

@hoshibara hoshibara changed the title [FlexDecoding] FlexDecoding accuracy discrepancy between XPU and CUDA while compiling torch.ops.higher_order.flex_attention [FlexDecoding] FlexDecoding accuracy discrepancy between XPU and CUDA while compiling torch.ops.higher_order.flex_attention Mar 3, 2025
@hoshibara hoshibara changed the title [FlexDecoding] FlexDecoding accuracy discrepancy between XPU and CUDA while compiling torch.ops.higher_order.flex_attention [FlexAttention] FlexDecoding accuracy discrepancy between XPU and CUDA while compiling torch.ops.higher_order.flex_attention Mar 3, 2025
@liangan1
Copy link

@vlad-penkin is there any updates about this issue?

@chengjunlu
Copy link
Contributor

chengjunlu commented Mar 19, 2025

Is this issue overlapped with #3631
Can we close this to as a duplicated issue?

@hoshibara
Copy link
Author

Is this issue overlapped with #3631 Can we close this to as a duplicated issue?

Yes, I kept this issue open only because it has already been tagged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants