Skip to content

Conversation

@yuguo68
Copy link
Contributor

@yuguo68 yuguo68 commented Jan 21, 2026

Motivation

this change makes mha_bwd consistent with mha_fwd, also provides the option to disable bwd FAV3 if necessary (e.g., in OSS PyTorch).
 
also set both FAV3_ON and FAV2_ON to 1 if they are not defined. On trunk if neither is set the mha_fwd kernel would return -1.

also it seems modules libmha_fwd and libmha_bwd are missing -DFAV2_ON=1, and this PR adds it for bwd.

Technical Details

Test Plan

Test Result

Submission Checklist

@yuguo68 yuguo68 requested a review from a team January 21, 2026 06:55
@yuguo68
Copy link
Contributor Author

yuguo68 commented Jan 22, 2026

@valarLip @slippedJim could you help review? would like to include this PR in PyTorch's aiter version update. Thanks!

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.

1 participant