-
Notifications
You must be signed in to change notification settings - Fork 2
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 xformers support #20
Comments
Simple op availability assertion: op = xformers.ops.fmha.flash3.FwOp
if op.is_available():
print(f"xformers_ops_fmha_flash3 supported: {HAS_FLASH}") References
[email protected]: available
[email protected]: available |
#23 should fix this |
Looks good to me, but xformers build from sources with FA3 support might trigger recompilation in the existing environment and overlap with previous Flash Attention v3 installation. Me and a colleague @ohwi, found a point of conflict between xformers FA3 Torch custom op wrapper logic and TypeError: fwd(): incompatible function arguments. The following argument types are supported: 1. (arg0: torch.Tensor, arg1: torch.Tensor, arg2: torch.Tensor, arg3: Optional[torch.Tensor], arg4: float, arg5: Optional[torch.Tensor], arg6: Optional[torch.Tensor], arg7: Optional[torch.Tensor], arg8: bool, arg9: int, arg10: int) -> list[torch.Tensor] Our understanding of the conflict:
And there is a code block in Therefore, although xformers prints FLASH3 as available operator, we need to further assert its execution. I made it work with This consideration might be worth creating a proper issue in xformers repo, what do you think @xuzhao9? |
Yes I think it is a valid issue to post to the xformers repo @antferdom |
Add xformers built on source code, similar to fbgemm: https://github.com/facebookresearch/xformers
Make sure fa3 is available.
The text was updated successfully, but these errors were encountered: