Streamlining of Scaled Dot-Product Attention#901
Merged
auphelia merged 22 commits intoXilinx:devfrom May 27, 2025
Merged
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Trying ideas and bug fixes for streamlining the scaled dot-product attention operator. Related to issue/discussion #878
MoveScalarMulPastMatMulfor two-input join-node matmulsAbsorb1BitMulIntoMatMulandAbsorb1BitMulIntoConvtest for the presence of weight initializersInferShapesfails afterFoldTransposeIntoQuantInitMoveScalarAddPastMatMulby preferringAbsorbSignBiasIntoMultiThresholdFoldQuantWeightstransformation currently propagating shapes backwards and maybe generating the inverse of the scale factorAbsorbAddIntoMultiThresholdtransformation assuming input and initializer order which might not always hold trueFix (and include?) the(Seems to be fixed by fixing one of the other issues, was probably caused by faulty rewiring of the graph inMoveLinearPastEltwiseAddtransformation which does not correctly propagate the shapesFoldQuantWeights, transformation seems not to be required anymore, maybe reopen)Suggest Brevitas to change all the quantizers to signed quantizers to be finn compatibleSuggest Brevitas to change order of quantizer and transpose of the key matrix to make detecting the pattern easier and treat all three inputs the sameRemoveIdentityOpshandling fork-node producer