!28921 Fix attr check bug

Merge pull request !28921 from jiaoy1224/aot
This commit is contained in:
i-robot 2022-01-12 06:23:49 +00:00 committed by Gitee
commit cdb5a352a7
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 1 additions and 1 deletions

View File

@ -109,7 +109,7 @@ bool IsAkgMatMul(size_t K, size_t M, size_t N) {
std::tuple<bool, bool, bool> NeedPad(const CNodePtr &matmul, vec *pad_shape_a, vec *pad_shape_b, vec *unpad_shape,
vec *tail_shape_a, vec *tail_shape_b, vec *tail_shape_unpad) {
auto mm_attrs = AnfAlgo::GetCNodePrimitive(matmul)->attrs();
if (mm_attrs.count("transpose_a") != 0 || mm_attrs.count("transpose_b") != 0) {
if (mm_attrs.count("transpose_a") == 0 || mm_attrs.count("transpose_b") == 0) {
MS_LOG(ERROR) << "attrs transpose_a and transpose_b need to be set";
return std::tuple(false, false, false);
}