已合并
增加AngleV2大维度拦截 #3561
BoyangZhang创建于 6月26日
增加AngleV2大维度拦截 #3561
已合并
BoyangZhang创建于 6月26日
1 个文件变更+11-5
Mmath/angle_v2/op_host/angle_v2_tiling.cpp+11-5
@@ -229,17 +229,23 @@ ge::graphStatus AngleV2Tiling::Init()
229 auto xShape = inputShape0->GetStorageShape();229 auto xShape = inputShape0->GetStorageShape();
230 totalLength = xShape.GetShapeSize();230 totalLength = xShape.GetShapeSize();
231 OP_LOGD(tilingContext, "totalLength %ld.", totalLength);231 OP_LOGD(tilingContext, "totalLength %ld.", totalLength);
232- if (xShape.GetDimNum() > 8){
233- OP_LOGW(tilingContext, "AngleV2 only support tensor with dim num <= 8, but input dim num is %zu.",
234- xShape.GetDimNum());
235- }
236- 
237 auto platformInfo = tilingContext->GetPlatformInfo();232 auto platformInfo = tilingContext->GetPlatformInfo();
238 if (platformInfo == nullptr) {233 if (platformInfo == nullptr) {
239 return ge::GRAPH_FAILED;234 return ge::GRAPH_FAILED;
240 }235 }
241 auto ascendcPlatform = platform_ascendc::PlatformAscendC(platformInfo);236 auto ascendcPlatform = platform_ascendc::PlatformAscendC(platformInfo);
242 socVersion = ascendcPlatform.GetSocVersion();237 socVersion = ascendcPlatform.GetSocVersion();
238+ 
239+ if (xShape.GetDimNum() > 8) {
240+ if (socVersion == platform_ascendc::SocVersion::ASCEND950) {
241+ OP_LOGE(tilingContext, "AngleV2 only support tensor with dim num <= 8, but input dim num is %zu.",
242+ xShape.GetDimNum());
243+ return ge::GRAPH_FAILED;
244+ } else {
245+ OP_LOGW(tilingContext, "AngleV2 only support tensor with dim num <= 8, but input dim num is %zu.",
246+ xShape.GetDimNum());
247+ }
248+ }
243 coreNum = ascendcPlatform.GetCoreNumAiv();249 coreNum = ascendcPlatform.GetCoreNumAiv();
244 OP_LOGD(tilingContext, "coreNum %ld.", coreNum);250 OP_LOGD(tilingContext, "coreNum %ld.", coreNum);
245 if (coreNum == 0) {251 if (coreNum == 0) {