Support acl bf16/fp16 gemm custom call#1143
Merged
Guo-Peilin merged 4 commits intomainfrom Jun 8, 2023
Merged
Conversation
qiuxiafei
reviewed
May 17, 2023
| Value rhs_f16 = rewriter.create<mhlo::ConvertOp>(loc, rhs, f16_ty); | ||
| RankedTensorType f16_tensor_ty = | ||
| RankedTensorType::getChecked(loc, result_ty.getShape(), f16_ty); | ||
| if (lhs_ty.getRank() != 2 || rhs_ty.getRank() != 2) return failure(); |
There was a problem hiding this comment.
It seems only ACL bf16 kernel doesn't support higher rank? So we need to also check dtype here ?
| FloatType f16_ty = FloatType::getF16(&ctx); | ||
| patterns.insert<ConvertDotGeneralOp>(&ctx, f16_ty); | ||
| } | ||
| if (enable_bf16_gemm_) { |
There was a problem hiding this comment.
should enable_bf16_gemm_ and enable_fp16_gemm_ be mutual exclusive?
Collaborator
|
Please add some UTs. |
d3399d9 to
de6330f
Compare
but ... passes are removed ... Orz ... |
9f59419 to
610bdee
Compare
This file contains hidden or 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
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.
No description provided.