已合并
adaptivemaxpool3dgrad A5整除场景不路由到maxpool3dgrad #6735
adaptivemaxpool3dgrad A5整除场景不路由到maxpool3dgrad #6735
已合并
胡一航创建于 6月29日
4 个文件变更+15-9
@@ -162,6 +162,7 @@ aclnnStatus aclnnAdaptiveMaxPool3dBackward(
162 <td>-</td>162 <td>-</td>
163 </tr>163 </tr>
164 </tbody></table>164 </tbody></table>
165+ - <term>Atlas A3 训练系列产品/Atlas A3 推理系列产品</term><term>Atlas A2 训练系列产品/Atlas A2 推理系列产品</term>:参数`indices`的数据类型不支持INT64,
165- **返回值:**166- **返回值:**
166 167
167 aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。168 aclnnStatus:返回状态码,具体参见[aclnn返回码](../../../docs/zh/context/aclnn返回码.md)。
@@ -96,12 +96,14 @@ static bool CheckSelfShapeSupport(const aclTensor* self)
96 const auto& selfDimH = selfShape.GetDim(selfDimNum + H_DIM);96 const auto& selfDimH = selfShape.GetDim(selfDimNum + H_DIM);
97 97 
98 const int64_t selfSize = selfDimW * selfDimH;98 const int64_t selfSize = selfDimW * selfDimH;
99- OP_CHECK(99+ if (!Ops::NN::AclnnUtil::IsRegbase()) {
100- (selfSize <= MAX_INT32),100+ OP_CHECK(
101- OP_LOGE(101+ (selfSize <= MAX_INT32),
102- ACLNN_ERR_PARAM_INVALID, "The size of self should be less than or equal to 2^32 - 1, but got selfSize:%ld",102+ OP_LOGE(
103- selfSize),103+ ACLNN_ERR_PARAM_INVALID, "The size of self should be less than or equal to 2^31 - 1, but got selfSize:%ld",
104- return false);104+ selfSize),
105+ return false);
106+ }
105 return true;107 return true;
106}108}
107 109 
@@ -103,12 +103,15 @@ static bool CheckSelfShapeSupport(const aclTensor* self)
103 103
104 104 
105 const int64_t selfSize = selfDimW * selfDimH * selfDimD;105 const int64_t selfSize = selfDimW * selfDimH * selfDimD;
106- OP_CHECK(106+ if (!Ops::NN::AclnnUtil::IsRegbase()) {
107+ OP_CHECK(
107 (selfSize <= MAX_INT32),108 (selfSize <= MAX_INT32),
108 OP_LOGE(109 OP_LOGE(
109- ACLNN_ERR_PARAM_INVALID, "The size of self should be less than or equal to 2^32 - 1, but got selfSize:%ld",110+ ACLNN_ERR_PARAM_INVALID, "The size of self should be less than or equal to 2^31 - 1, but got selfSize:%ld",
110 selfSize),111 selfSize),
111 return false);112 return false);
113+ }
114+
112 return true;115 return true;
113}116}
114 117 
@@ -158,7 +158,7 @@ const aclTensor* selectLevelZeroOperation(
158 }158 }
159 }159 }
160 160 
161- if (useMaxPool3DGradWithArgmax) {161+ if (useMaxPool3DGradWithArgmax && !Ops::NN::AclnnUtil::IsRegbase()) {
162 aclIntArray* calculatedKernelSize = executor->AllocIntArray(kernelSize.data(), KERNEL_SIZE_DIM_NUM);162 aclIntArray* calculatedKernelSize = executor->AllocIntArray(kernelSize.data(), KERNEL_SIZE_DIM_NUM);
163 CHECK_RET(calculatedKernelSize != nullptr, nullptr);163 CHECK_RET(calculatedKernelSize != nullptr, nullptr);
164 aclIntArray* calculatedStride = executor->AllocIntArray(stride.data(), STRIDE_DIM_NUM);164 aclIntArray* calculatedStride = executor->AllocIntArray(stride.data(), STRIDE_DIM_NUM);