Merged
fix: 修复 GetShape infershape UT 多输入用例的 NodeIoNum 声明冲突 #7022
tan_xinAdd on 7 days ago
fix: 修复 GetShape infershape UT 多输入用例的 NodeIoNum 声明冲突 #7022
Merged
Merged fromtan_xin/ops-mathmaster-tileintocann/ops-mathmaster
Total: 2 files changed+3-4
| @@ -66,7 +66,6 @@ TEST_F(GetShapeInferShapeTest, TwoInputs_2D_And_3D) | |||
| 66 | 66 | ||
| 67 | auto holder = gert::InferShapeContextFaker() | 67 | auto holder = gert::InferShapeContextFaker() |
| 68 | .SetOpType("GetShape") | 68 | .SetOpType("GetShape") |
| 69 | - .NodeIoNum(1, 1) | ||
| 70 | .IrInstanceNum({2}, {1}) | 69 | .IrInstanceNum({2}, {1}) |
| 71 | .NodeInputTd(0, ge::DT_FLOAT, ge::FORMAT_ND, ge::FORMAT_ND) | 70 | .NodeInputTd(0, ge::DT_FLOAT, ge::FORMAT_ND, ge::FORMAT_ND) |
| 72 | .NodeOutputTd(0, ge::DT_INT32, ge::FORMAT_ND, ge::FORMAT_ND) | 71 | .NodeOutputTd(0, ge::DT_INT32, ge::FORMAT_ND, ge::FORMAT_ND) |
| @@ -136,7 +135,6 @@ TEST_F(GetShapeInferShapeTest, MultipleDtypes) | |||
| 136 | 135 | ||
| 137 | auto holder = gert::InferShapeContextFaker() | 136 | auto holder = gert::InferShapeContextFaker() |
| 138 | .SetOpType("GetShape") | 137 | .SetOpType("GetShape") |
| 139 | - .NodeIoNum(1, 1) | ||
| 140 | .IrInstanceNum({3}, {1}) | 138 | .IrInstanceNum({3}, {1}) |
| 141 | .NodeInputTd(0, ge::DT_INT64, ge::FORMAT_ND, ge::FORMAT_ND) | 139 | .NodeInputTd(0, ge::DT_INT64, ge::FORMAT_ND, ge::FORMAT_ND) |
| 142 | .NodeOutputTd(0, ge::DT_INT32, ge::FORMAT_ND, ge::FORMAT_ND) | 140 | .NodeOutputTd(0, ge::DT_INT32, ge::FORMAT_ND, ge::FORMAT_ND) |
| @@ -53,8 +53,9 @@ static bool CheckNotNull(const aclTensor* self, const aclTensor* out) | |||
| 53 | 53 | ||
| 54 | static inline bool CheckSocVersionIsSupportBf16(void) | 54 | static inline bool CheckSocVersionIsSupportBf16(void) |
| 55 | { | 55 | { |
| 56 | - return GetCurrentPlatformInfo().GetSocVersion() >= SocVersion::ASCEND910B && | 56 | + return (GetCurrentPlatformInfo().GetSocVersion() >= SocVersion::ASCEND910B && |
| 57 | - GetCurrentPlatformInfo().GetSocVersion() <= SocVersion::ASCEND910E; | 57 | + GetCurrentPlatformInfo().GetSocVersion() <= SocVersion::ASCEND910E) || |
| 58 | + IsRegBase(); | ||
| 58 | } | 59 | } |
| 59 | 60 | ||
| 60 | static bool CheckDtypeValid(const aclTensor* self, const aclTensor* out) | 61 | static bool CheckDtypeValid(const aclTensor* self, const aclTensor* out) |