-
Notifications
You must be signed in to change notification settings - Fork 635
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[fused seqpar] Support multi-query settings in Triton
In allgather+matmul we required the strides of the weight and of the output matrices to be equal. When using multi-query, wq is larger than wk/wv, thus its strides are different. (This is actually not true, because wq/wk/wv are column-major, hence their stride is in_feats, not out_feats, but the outputs are row-major thus their strides pose a problem). The solution is just to support arbitrary strides. It's very ugly and bulky since we need to pass tons of parameters around, but it works. ghstack-source-id: d40a452c7121fdd9992773bfc2c14aeba503804e Pull Request resolved: fairinternal/xformers#1007 __original_commit__ = fairinternal/xformers@cb71011
- Loading branch information
Showing
2 changed files
with
121 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters