-
Notifications
You must be signed in to change notification settings - Fork 633
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
Incompatibility Between xformers FA3 Torch Custom op Wrapper and recent flashattn_hopper_cuda
#1159
Comments
CC @bottler |
The library should work with the actual submodules' commits. It is not a bug in xformers if updating the flash submodule to a different commit produces an incompatibility. In general that is impossible to avoid. At some point I expect xformers will be updated to a more recent flash version. If you want to submit a PR which updates the submodule to a more recent commit, and updates flash.py and flash3.py consistent with it, and tests are passing, then that would be great! |
Hi, sorry for the late response. I’ll do my best to get this done over the weekend, and make a PR. Thank you! |
Could you elaborate on what was the issue there? |
Sorry, I’m not exactly remember what the issue was, but I suspect it might be related to my environment rather than the library itself. I’ll try re-installing the library and will share the specific error if it happens again. |
There is an incompatibility between xformers FA3 Torch custom op wrapper logic and recent
flashattn_hopper_cuda
changes, resulting in aTypeError
due to changes in required arguments for thefwd()
function:The recent FA3 requires the positional arguments
window_size_left
andwindow_size_right
(see source).Me and my colleague @antferdom encountered this issue while attempting to use our own installed FA3 due to failure in compiling FA3 within xformers. As a result, we made modifications to
mha_fwd
to use FA3 as a fallback.So, we suggest updating
mha_fwd
to properly account forwindow_size_left
andwindow_size_right
as required positional arguments, or adding a check in_C_flashattention3.fwd
to determine if these arguments are needed to support all versions of FA3.If this solution is acceptable, we would be happy to submit a Pull Request to address this issue.
The text was updated successfully, but these errors were encountered: