fix dynamic op:batchmatmul get attr error

This commit is contained in:
jjfeing 2022-08-12 14:44:36 +08:00 committed by ZPaC
parent 539c9c735b
commit 532392f871
3 changed files with 11 additions and 1 deletions

View File

@ -94,7 +94,8 @@ std::map<std::string, std::string> OpTilingCalculateAdapter::GetConvertAttr(cons
{"ArgMaxWithValue", {{"axis", "dimension"}}},
{"ArgMinWithValue", {{"axis", "dimension"}}},
{"DepthToSpace", {{"block_size", "block_size"}}},
{"Conv2D", {{"pad_list", "pads"}, {"dilation", "dilations"}, {"stride", "strides"}}}};
{"Conv2D", {{"pad_list", "pads"}, {"dilation", "dilations"}, {"stride", "strides"}}},
{"BatchMatMul", {{"transpose_x1", "adj_x1"}, {"transpose_x2", "adj_x2"}}}};
auto iter = op_type_map.find(op_type);
return iter == op_type_map.end() ? attrs : iter->second;
}

View File

@ -17,6 +17,7 @@ import time
import logging
from typing import Optional, Tuple
import numpy as np
import pytest
import mindspore
@ -1745,6 +1746,10 @@ def create_dataset(batch_size=32, label_len=30, mel_bins=80):
return ds
@pytest.mark.level0
@pytest.mark.platform_arm_ascend_training
@pytest.mark.platform_x86_ascend_training
@pytest.mark.env_onecard
def test_train():
"""
Feature: Test the simplified dynamic shape WeNet-ASR network with small data.

View File

@ -303,6 +303,10 @@ class MaxPool(nn.Cell):
return out
@pytest.mark.level0
@pytest.mark.platform_arm_ascend_training
@pytest.mark.platform_x86_ascend_training
@pytest.mark.env_onecard
def test_dynamic_custom_dense():
"""
Feature: Test Dynamic Dense and its backward. The input shape is dynamic.