已合并
foreach log fix #7763
AlfengYuan创建于 7月21日
foreach log fix #7763
已合并
AlfengYuan创建于 7月21日
52 个文件变更+119-83
@@ -59,7 +59,7 @@ static inline bool CheckFormat(const aclTensorList* x1, const aclTensorList* x2,
59 for (uint64_t i = 0; i < x1->Size(); i++) {59 for (uint64_t i = 0; i < x1->Size(); i++) {
60 if (IsPrivateFormat((*x1)[i]->GetStorageFormat()) || IsPrivateFormat((*x2)[i]->GetStorageFormat()) ||60 if (IsPrivateFormat((*x1)[i]->GetStorageFormat()) || IsPrivateFormat((*x2)[i]->GetStorageFormat()) ||
61 IsPrivateFormat((*out)[i]->GetStorageFormat())) {61 IsPrivateFormat((*out)[i]->GetStorageFormat())) {
62- OP_LOGE(ACLNN_ERR_PARAM_INVALID, "Format only support NDNCHWNHWCHWCNNDHWCNCDHW.");62+ OP_LOGE(ACLNN_ERR_PARAM_INVALID, "Format only support ND, NCHW, NHWC, HWCN, NDHWC, NCDHW.");
63 return false;63 return false;
64 }64 }
65 }65 }
@@ -63,7 +63,7 @@ static inline bool ForeachAddListV2CheckFormat(const aclTensorList* self, const
63 // self格式不能是私有格式63 // self格式不能是私有格式
64 if (IsPrivateFormat((*self)[i]->GetStorageFormat()) || IsPrivateFormat((*x2)[i]->GetStorageFormat()) ||64 if (IsPrivateFormat((*self)[i]->GetStorageFormat()) || IsPrivateFormat((*x2)[i]->GetStorageFormat()) ||
65 IsPrivateFormat((*out)[i]->GetStorageFormat())) {65 IsPrivateFormat((*out)[i]->GetStorageFormat())) {
66- OP_LOGE(ACLNN_ERR_PARAM_INVALID, "Format only support NDNCHWNHWCHWCNNDHWCNCDHW.");66+ OP_LOGE(ACLNN_ERR_PARAM_INVALID, "Format only support ND, NCHW, NHWC, HWCN, NDHWC, NCDHW.");
67 return false;67 return false;
68 }68 }
69 }69 }
@@ -1,3 +1,13 @@
1+/**
2+ * Copyright (c) 2026 Huawei Technologies Co., Ltd.
3+ * This program is free software, you can redistribute it and/or modify it under the terms and conditions of
4+ * CANN Open Software License Agreement Version 2.0 (the "License").
5+ * Please refer to the License for details. You may not use this file except in compliance with the License.
6+ * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
7+ * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8+ * See LICENSE in the root of the software repository for the full text of the License.
9+ */
10+ 
1// test_geir for ForeachAddListInplace (GEIR graph-mode verify, dynamic tensor-list inputs).11// test_geir for ForeachAddListInplace (GEIR graph-mode verify, dynamic tensor-list inputs).
2#include <iostream>12#include <iostream>
3#include <vector>13#include <vector>
@@ -83,13 +93,11 @@ int main(int argc, char* argv[])
83 vector<ge::Tensor> input;93 vector<ge::Tensor> input;
84 map<AscendString, AscendString> global_options = {{"ge.exec.deviceId", "0"}, {"ge.graphRunMode", "1"}};94 map<AscendString, AscendString> global_options = {{"ge.exec.deviceId", "0"}, {"ge.graphRunMode", "1"}};
85 if (ge::GEInitialize(global_options) != SUCCESS) {95 if (ge::GEInitialize(global_options) != SUCCESS) {
86- printf("GEInit failed\n");
87 return FAILED;96 return FAILED;
88 }97 }
89 printf("%s - INFO - [XIR]: Initialize ge success\n", GetTime().c_str());98 printf("%s - INFO - [XIR]: Initialize ge success\n", GetTime().c_str());
90 vector<Operator> inputs{}, outputs{};99 vector<Operator> inputs{}, outputs{};
91 if (CreateOppInGraph(input, inputs, outputs, graph) != SUCCESS) {100 if (CreateOppInGraph(input, inputs, outputs, graph) != SUCCESS) {
92- printf("create failed\n");
93 return FAILED;101 return FAILED;
94 }102 }
95 if (!inputs.empty() && !outputs.empty())103 if (!inputs.empty() && !outputs.empty())
@@ -97,15 +105,12 @@ int main(int argc, char* argv[])
97 map<AscendString, AscendString> opts = {};105 map<AscendString, AscendString> opts = {};
98 Session* session = new Session(opts);106 Session* session = new Session(opts);
99 if (session == nullptr) {107 if (session == nullptr) {
100- printf("session null\n");
101 return FAILED;108 return FAILED;
102 }109 }
103 uint32_t gid = 0;110 uint32_t gid = 0;
104 session->AddGraph(gid, graph, opts);111 session->AddGraph(gid, graph, opts);
105- printf("%s - INFO - [XIR]: Session add graph success\n", GetTime().c_str());
106 vector<ge::Tensor> output;112 vector<ge::Tensor> output;
107 if (session->RunGraph(gid, input, output) != SUCCESS) {113 if (session->RunGraph(gid, input, output) != SUCCESS) {
108- printf("%s - INFO - [XIR]: Run graph failed\n", GetTime().c_str());
109 delete session;114 delete session;
110 GEFinalize();115 GEFinalize();
111 return FAILED;116 return FAILED;
@@ -66,7 +66,7 @@ static inline bool ForeachAddScalarV2CheckFormat(const aclTensorList* self, cons
66 for (uint64_t i = 0; i < self->Size(); i++) {66 for (uint64_t i = 0; i < self->Size(); i++) {
67 // self格式不能是私有格式67 // self格式不能是私有格式
68 if (IsPrivateFormat((*self)[i]->GetStorageFormat()) || IsPrivateFormat((*out)[i]->GetStorageFormat())) {68 if (IsPrivateFormat((*self)[i]->GetStorageFormat()) || IsPrivateFormat((*out)[i]->GetStorageFormat())) {
69- OP_LOGE(ACLNN_ERR_PARAM_INVALID, "Format only support NDNCHWNHWCHWCNNDHWCNCDHW.");69+ OP_LOGE(ACLNN_ERR_PARAM_INVALID, "Format only support ND, NCHW, NHWC, HWCN, NDHWC, NCDHW.");
70 return false;70 return false;
71 }71 }
72 }72 }
@@ -60,7 +60,7 @@ static inline bool CheckFormat(const aclTensorList* x1, const aclTensorList* x2,
60 for (uint64_t i = 0; i < x1->Size(); i++) {60 for (uint64_t i = 0; i < x1->Size(); i++) {
61 if (IsPrivateFormat((*out)[i]->GetStorageFormat()) || IsPrivateFormat((*x1)[i]->GetStorageFormat()) ||61 if (IsPrivateFormat((*out)[i]->GetStorageFormat()) || IsPrivateFormat((*x1)[i]->GetStorageFormat()) ||
62 IsPrivateFormat((*x2)[i]->GetStorageFormat()) || IsPrivateFormat((*x3)[i]->GetStorageFormat())) {62 IsPrivateFormat((*x2)[i]->GetStorageFormat()) || IsPrivateFormat((*x3)[i]->GetStorageFormat())) {
63- OP_LOGE(ACLNN_ERR_PARAM_INVALID, "Format only support NDNCHWNHWCHWCNNDHWCNCDHW.");63+ OP_LOGE(ACLNN_ERR_PARAM_INVALID, "Format only support ND, NCHW, NHWC, HWCN, NDHWC, NCDHW.");
64 return false;64 return false;
65 }65 }
66 }66 }
@@ -59,7 +59,7 @@ static inline bool ForeachAddcdivScalarV2CheckFormat(const aclTensorList* self,
59 // self格式不能是私有格式59 // self格式不能是私有格式
60 if (IsPrivateFormat((*self)[i]->GetStorageFormat()) || IsPrivateFormat((*x2)[i]->GetStorageFormat()) ||60 if (IsPrivateFormat((*self)[i]->GetStorageFormat()) || IsPrivateFormat((*x2)[i]->GetStorageFormat()) ||
61 IsPrivateFormat((*x3)[i]->GetStorageFormat()) || IsPrivateFormat((*out)[i]->GetStorageFormat())) {61 IsPrivateFormat((*x3)[i]->GetStorageFormat()) || IsPrivateFormat((*out)[i]->GetStorageFormat())) {
62- OP_LOGE(ACLNN_ERR_PARAM_INVALID, "Format only support NDNCHWNHWCHWCNNDHWCNCDHW.");62+ OP_LOGE(ACLNN_ERR_PARAM_INVALID, "Format only support ND, NCHW, NHWC, HWCN, NDHWC, NCDHW.");
63 return false;63 return false;
64 }64 }
65 }65 }
@@ -57,7 +57,7 @@ static inline bool CheckFormat(const aclTensorList* x1, const aclTensorList* x2,
57 for (uint64_t i = 0; i < x1->Size(); i++) {57 for (uint64_t i = 0; i < x1->Size(); i++) {
58 if (IsPrivateFormat((*out)[i]->GetStorageFormat()) || IsPrivateFormat((*x1)[i]->GetStorageFormat()) ||58 if (IsPrivateFormat((*out)[i]->GetStorageFormat()) || IsPrivateFormat((*x1)[i]->GetStorageFormat()) ||
59 IsPrivateFormat((*x2)[i]->GetStorageFormat()) || IsPrivateFormat((*x3)[i]->GetStorageFormat())) {59 IsPrivateFormat((*x2)[i]->GetStorageFormat()) || IsPrivateFormat((*x3)[i]->GetStorageFormat())) {
60- OP_LOGE(ACLNN_ERR_PARAM_INVALID, "Format only support NDNCHWNHWCHWCNNDHWCNCDHW.");60+ OP_LOGE(ACLNN_ERR_PARAM_INVALID, "Format only support ND, NCHW, NHWC, HWCN, NDHWC, NCDHW.");
61 return false;61 return false;
62 }62 }
63 }63 }
@@ -1,3 +1,13 @@
1+/**
2+ * Copyright (c) 2026 Huawei Technologies Co., Ltd.
3+ * This program is free software, you can redistribute it and/or modify it under the terms and conditions of
4+ * CANN Open Software License Agreement Version 2.0 (the "License").
5+ * Please refer to the License for details. You may not use this file except in compliance with the License.
6+ * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
7+ * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8+ * See LICENSE in the root of the software repository for the full text of the License.
9+ */
10+ 
1// test_geir for ForeachAddcmulList (GEIR verify; 3 dynamic input lists + scalars + dynamic output).11// test_geir for ForeachAddcmulList (GEIR verify; 3 dynamic input lists + scalars + dynamic output).
2#include <iostream>12#include <iostream>
3#include <vector>13#include <vector>
@@ -92,13 +102,11 @@ int main(int argc, char* argv[])
92 vector<ge::Tensor> input;102 vector<ge::Tensor> input;
93 map<AscendString, AscendString> go = {{"ge.exec.deviceId", "0"}, {"ge.graphRunMode", "1"}};103 map<AscendString, AscendString> go = {{"ge.exec.deviceId", "0"}, {"ge.graphRunMode", "1"}};
94 if (ge::GEInitialize(go) != SUCCESS) {104 if (ge::GEInitialize(go) != SUCCESS) {
95- printf("GEInit failed\n");
96 return FAILED;105 return FAILED;
97 }106 }
98 printf("%s - INFO - [XIR]: Initialize ge success\n", GetTime().c_str());107 printf("%s - INFO - [XIR]: Initialize ge success\n", GetTime().c_str());
99 vector<Operator> inputs{}, outputs{};108 vector<Operator> inputs{}, outputs{};
100 if (CreateOppInGraph(input, inputs, outputs, graph) != SUCCESS) {109 if (CreateOppInGraph(input, inputs, outputs, graph) != SUCCESS) {
101- printf("create failed\n");
102 return FAILED;110 return FAILED;
103 }111 }
104 if (!inputs.empty() && !outputs.empty())112 if (!inputs.empty() && !outputs.empty())
@@ -106,15 +114,12 @@ int main(int argc, char* argv[])
106 map<AscendString, AscendString> opts = {};114 map<AscendString, AscendString> opts = {};
107 Session* session = new Session(opts);115 Session* session = new Session(opts);
108 if (session == nullptr) {116 if (session == nullptr) {
109- printf("session null\n");
110 return FAILED;117 return FAILED;
111 }118 }
112 uint32_t gid = 0;119 uint32_t gid = 0;
113 session->AddGraph(gid, graph, opts);120 session->AddGraph(gid, graph, opts);
114- printf("%s - INFO - [XIR]: Session add graph success\n", GetTime().c_str());
115 vector<ge::Tensor> output;121 vector<ge::Tensor> output;
116 if (session->RunGraph(gid, input, output) != SUCCESS) {122 if (session->RunGraph(gid, input, output) != SUCCESS) {
117- printf("%s - INFO - [XIR]: Run graph failed\n", GetTime().c_str());
118 delete session;123 delete session;
119 GEFinalize();124 GEFinalize();
120 return FAILED;125 return FAILED;
@@ -64,7 +64,7 @@ static inline bool ForeachAddcMulScalarV2CheckFormat(const aclTensorList* self,
64 // self格式不能是私有格式64 // self格式不能是私有格式
65 if (IsPrivateFormat((*self)[i]->GetStorageFormat()) || IsPrivateFormat((*x2)[i]->GetStorageFormat()) ||65 if (IsPrivateFormat((*self)[i]->GetStorageFormat()) || IsPrivateFormat((*x2)[i]->GetStorageFormat()) ||
66 IsPrivateFormat((*x3)[i]->GetStorageFormat()) || IsPrivateFormat((*out)[i]->GetStorageFormat())) {66 IsPrivateFormat((*x3)[i]->GetStorageFormat()) || IsPrivateFormat((*out)[i]->GetStorageFormat())) {
67- OP_LOGE(ACLNN_ERR_PARAM_INVALID, "Format only support NDNCHWNHWCHWCNNDHWCNCDHW.");67+ OP_LOGE(ACLNN_ERR_PARAM_INVALID, "Format only support ND, NCHW, NHWC, HWCN, NDHWC, NCDHW.");
68 return false;68 return false;
69 }69 }
70 }70 }
@@ -71,7 +71,8 @@ static ge::graphStatus ForeachAtanTilingFunc(gert::TilingContext* context)
71 OP_CHECK_IF(memset_s(tiling, sizeof(ForeachAtanTilingData), 0, sizeof(ForeachAtanTilingData)) != EOK,71 OP_CHECK_IF(memset_s(tiling, sizeof(ForeachAtanTilingData), 0, sizeof(ForeachAtanTilingData)) != EOK,
72 OP_LOGE(context, "set tiling data error"), return ge::GRAPH_FAILED);72 OP_LOGE(context, "set tiling data error"), return ge::GRAPH_FAILED);
73 73 
74- OP_CHECK_IF(tensorNum > MAX_TENSOR_NUM, OP_LOGE(context, "tensorNum should be less than or equal to 256"),74+ OP_CHECK_IF(tensorNum > MAX_TENSOR_NUM,
75+ OP_LOGE(context, "tensorNum[%lu] should be less than or equal to %u", tensorNum, MAX_TENSOR_NUM),
75 return ge::GRAPH_FAILED);76 return ge::GRAPH_FAILED);
76 tiling->tensorCount = static_cast<int32_t>(tensorNum);77 tiling->tensorCount = static_cast<int32_t>(tensorNum);
77 int64_t totalElements = 0;78 int64_t totalElements = 0;
@@ -1,3 +1,13 @@
1+/**
2+ * Copyright (c) 2026 Huawei Technologies Co., Ltd.
3+ * This program is free software, you can redistribute it and/or modify it under the terms and conditions of
4+ * CANN Open Software License Agreement Version 2.0 (the "License").
5+ * Please refer to the License for details. You may not use this file except in compliance with the License.
6+ * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
7+ * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8+ * See LICENSE in the root of the software repository for the full text of the License.
9+ */
10+ 
1// test_geir for ForeachBinaryOp (GEIR graph-mode verify; 2 dynamic input lists + dynamic output + op_code attr).11// test_geir for ForeachBinaryOp (GEIR graph-mode verify; 2 dynamic input lists + dynamic output + op_code attr).
2// ForeachBinaryOp is a fused graph-internal op (no aclnn entry); it is exercised through the GE IR graph path.12// ForeachBinaryOp is a fused graph-internal op (no aclnn entry); it is exercised through the GE IR graph path.
3// y[i] = x1[i] <op> x2[i], where <op> is selected by attr op_code: 0=add, 1=sub, 2=mul, 3=div.13// y[i] = x1[i] <op> x2[i], where <op> is selected by attr op_code: 0=add, 1=sub, 2=mul, 3=div.
@@ -84,13 +94,11 @@ int main(int argc, char* argv[])
84 vector<ge::Tensor> input;94 vector<ge::Tensor> input;
85 map<AscendString, AscendString> go = {{"ge.exec.deviceId", "0"}, {"ge.graphRunMode", "1"}};95 map<AscendString, AscendString> go = {{"ge.exec.deviceId", "0"}, {"ge.graphRunMode", "1"}};
86 if (ge::GEInitialize(go) != SUCCESS) {96 if (ge::GEInitialize(go) != SUCCESS) {
87- printf("GEInit failed\n");
88 return FAILED;97 return FAILED;
89 }98 }
90 printf("%s - INFO - [XIR]: Initialize ge success\n", GetTime().c_str());99 printf("%s - INFO - [XIR]: Initialize ge success\n", GetTime().c_str());
91 vector<Operator> inputs{}, outputs{};100 vector<Operator> inputs{}, outputs{};
92 if (CreateOppInGraph(input, inputs, outputs, graph) != SUCCESS) {101 if (CreateOppInGraph(input, inputs, outputs, graph) != SUCCESS) {
93- printf("create failed\n");
94 return FAILED;102 return FAILED;
95 }103 }
96 if (!inputs.empty() && !outputs.empty())104 if (!inputs.empty() && !outputs.empty())
@@ -98,15 +106,12 @@ int main(int argc, char* argv[])
98 map<AscendString, AscendString> opts = {};106 map<AscendString, AscendString> opts = {};
99 Session* session = new Session(opts);107 Session* session = new Session(opts);
100 if (session == nullptr) {108 if (session == nullptr) {
101- printf("session null\n");
102 return FAILED;109 return FAILED;
103 }110 }
104 uint32_t gid = 0;111 uint32_t gid = 0;
105 session->AddGraph(gid, graph, opts);112 session->AddGraph(gid, graph, opts);
106- printf("%s - INFO - [XIR]: Session add graph success\n", GetTime().c_str());
107 vector<ge::Tensor> output;113 vector<ge::Tensor> output;
108 if (session->RunGraph(gid, input, output) != SUCCESS) {114 if (session->RunGraph(gid, input, output) != SUCCESS) {
109- printf("%s - INFO - [XIR]: Run graph failed\n", GetTime().c_str());
110 delete session;115 delete session;
111 GEFinalize();116 GEFinalize();
112 return FAILED;117 return FAILED;
@@ -44,7 +44,7 @@ static inline bool CheckFormat(const aclTensorList* x, const aclTensorList* out)
44{44{
45 for (uint64_t i = 0; i < x->Size(); i++) {45 for (uint64_t i = 0; i < x->Size(); i++) {
46 if (IsPrivateFormat((*x)[i]->GetStorageFormat()) || IsPrivateFormat((*out)[i]->GetStorageFormat())) {46 if (IsPrivateFormat((*x)[i]->GetStorageFormat()) || IsPrivateFormat((*out)[i]->GetStorageFormat())) {
47- OP_LOGE(ACLNN_ERR_PARAM_INVALID, "Format only support NDNCHWNHWCHWCNNDHWCNCDHW.");47+ OP_LOGE(ACLNN_ERR_PARAM_INVALID, "Format only support ND, NCHW, NHWC, HWCN, NDHWC, NCDHW.");
48 return false;48 return false;
49 }49 }
50 }50 }
@@ -71,7 +71,8 @@ static ge::graphStatus ForeachCosTilingFunc(gert::TilingContext* context)
71 OP_CHECK_IF(memset_s(tiling, sizeof(ForeachCosTilingData), 0, sizeof(ForeachCosTilingData)) != EOK,71 OP_CHECK_IF(memset_s(tiling, sizeof(ForeachCosTilingData), 0, sizeof(ForeachCosTilingData)) != EOK,
72 OP_LOGE(context, "set tiling data error"), return ge::GRAPH_FAILED);72 OP_LOGE(context, "set tiling data error"), return ge::GRAPH_FAILED);
73 73 
74- OP_CHECK_IF(tensorNum > MAX_TENSOR_NUM, OP_LOGE(context, "tensorNum should be less than or equal to 256"),74+ OP_CHECK_IF(tensorNum > MAX_TENSOR_NUM,
75+ OP_LOGE(context, "tensorNum[%lu] should be less than or equal to %u", tensorNum, MAX_TENSOR_NUM),
75 return ge::GRAPH_FAILED);76 return ge::GRAPH_FAILED);
76 tiling->tensorCount = static_cast<int32_t>(tensorNum);77 tiling->tensorCount = static_cast<int32_t>(tensorNum);
77 int64_t totalElements = 0;78 int64_t totalElements = 0;
@@ -71,7 +71,8 @@ static ge::graphStatus ForeachCoshTilingFunc(gert::TilingContext* context)
71 OP_CHECK_IF(memset_s(tiling, sizeof(ForeachCoshTilingData), 0, sizeof(ForeachCoshTilingData)) != EOK,71 OP_CHECK_IF(memset_s(tiling, sizeof(ForeachCoshTilingData), 0, sizeof(ForeachCoshTilingData)) != EOK,
72 OP_LOGE(context, "set tiling data error"), return ge::GRAPH_FAILED);72 OP_LOGE(context, "set tiling data error"), return ge::GRAPH_FAILED);
73 73 
74- OP_CHECK_IF(tensorNum > MAX_TENSOR_NUM, OP_LOGE(context, "tensorNum should be less than or equal to 256"),74+ OP_CHECK_IF(tensorNum > MAX_TENSOR_NUM,
75+ OP_LOGE(context, "tensorNum[%lu] should be less than or equal to %u", tensorNum, MAX_TENSOR_NUM),
75 return ge::GRAPH_FAILED);76 return ge::GRAPH_FAILED);
76 tiling->tensorCount = static_cast<int32_t>(tensorNum);77 tiling->tensorCount = static_cast<int32_t>(tensorNum);
77 int64_t totalElements = 0;78 int64_t totalElements = 0;
@@ -55,7 +55,7 @@ static inline bool CheckFormat(const aclTensorList* x1, const aclTensorList* x2,
55 // self格式不能是私有格式55 // self格式不能是私有格式
56 if (IsPrivateFormat((*x2)[i]->GetStorageFormat()) || IsPrivateFormat((*x1)[i]->GetStorageFormat()) ||56 if (IsPrivateFormat((*x2)[i]->GetStorageFormat()) || IsPrivateFormat((*x1)[i]->GetStorageFormat()) ||
57 IsPrivateFormat((*out)[i]->GetStorageFormat())) {57 IsPrivateFormat((*out)[i]->GetStorageFormat())) {
58- OP_LOGE(ACLNN_ERR_PARAM_INVALID, "Format only support NDNCHWNHWCHWCNNDHWCNCDHW.");58+ OP_LOGE(ACLNN_ERR_PARAM_INVALID, "Format only support ND, NCHW, NHWC, HWCN, NDHWC, NCDHW.");
59 return false;59 return false;
60 }60 }
61 }61 }
@@ -46,7 +46,7 @@ static inline bool CheckFormat(const aclTensorList* self, const aclTensorList* o
46{46{
47 for (uint64_t i = 0; i < self->Size(); i++) {47 for (uint64_t i = 0; i < self->Size(); i++) {
48 if (IsPrivateFormat((*out)[i]->GetStorageFormat()) || IsPrivateFormat((*self)[i]->GetStorageFormat())) {48 if (IsPrivateFormat((*out)[i]->GetStorageFormat()) || IsPrivateFormat((*self)[i]->GetStorageFormat())) {
49- OP_LOGE(ACLNN_ERR_PARAM_INVALID, "Format only support NDNCHWNHWCHWCNNDHWCNCDHW.");49+ OP_LOGE(ACLNN_ERR_PARAM_INVALID, "Format only support ND, NCHW, NHWC, HWCN, NDHWC, NCDHW.");
50 return false;50 return false;
51 }51 }
52 }52 }
@@ -50,7 +50,7 @@ static inline bool CheckFormat(const aclTensorList* self, const aclTensorList* o
50 for (uint64_t i = 0; i < self->Size(); i++) {50 for (uint64_t i = 0; i < self->Size(); i++) {
51 // self格式不能是私有格式51 // self格式不能是私有格式
52 if (IsPrivateFormat((*self)[i]->GetStorageFormat()) || IsPrivateFormat((*out)[i]->GetStorageFormat())) {52 if (IsPrivateFormat((*self)[i]->GetStorageFormat()) || IsPrivateFormat((*out)[i]->GetStorageFormat())) {
53- OP_LOGE(ACLNN_ERR_PARAM_INVALID, "Format only support NDNCHWNHWCHWCNNDHWCNCDHW.");53+ OP_LOGE(ACLNN_ERR_PARAM_INVALID, "Format only support ND, NCHW, NHWC, HWCN, NDHWC, NCDHW.");
54 return false;54 return false;
55 }55 }
56 }56 }
@@ -71,7 +71,8 @@ static ge::graphStatus ForeachErfTilingFunc(gert::TilingContext* context)
71 OP_CHECK_IF(memset_s(tiling, sizeof(ForeachErfTilingData), 0, sizeof(ForeachErfTilingData)) != EOK,71 OP_CHECK_IF(memset_s(tiling, sizeof(ForeachErfTilingData), 0, sizeof(ForeachErfTilingData)) != EOK,
72 OP_LOGE(context, "set tiling data error"), return ge::GRAPH_FAILED);72 OP_LOGE(context, "set tiling data error"), return ge::GRAPH_FAILED);
73 73 
74- OP_CHECK_IF(tensorNum > MAX_TENSOR_NUM, OP_LOGE(context, "tensorNum should be less than or equal to 256"),74+ OP_CHECK_IF(tensorNum > MAX_TENSOR_NUM,
75+ OP_LOGE(context, "tensorNum[%lu] should be less than or equal to %u", tensorNum, MAX_TENSOR_NUM),
75 return ge::GRAPH_FAILED);76 return ge::GRAPH_FAILED);
76 tiling->tensorCount = static_cast<int32_t>(tensorNum);77 tiling->tensorCount = static_cast<int32_t>(tensorNum);
77 int64_t totalElements = 0;78 int64_t totalElements = 0;
@@ -128,4 +129,4 @@ static ge::graphStatus TilingParseForForeachErf([[maybe_unused]] gert::TilingPar
128 129 
129IMPL_OP_OPTILING(ForeachErf).Tiling(ForeachErfTilingFunc).TilingParse<ForeachErfCompileInfo>(TilingParseForForeachErf);130IMPL_OP_OPTILING(ForeachErf).Tiling(ForeachErfTilingFunc).TilingParse<ForeachErfCompileInfo>(TilingParseForForeachErf);
130 131 
131-} // namespace optiling132+} // namespace optiling
@@ -67,7 +67,8 @@ static ge::graphStatus ForeachExpTilingFunc(gert::TilingContext* context)
67 OP_CHECK_IF(memset_s(tiling, sizeof(ForeachExpTilingData), 0, sizeof(ForeachExpTilingData)) != EOK,67 OP_CHECK_IF(memset_s(tiling, sizeof(ForeachExpTilingData), 0, sizeof(ForeachExpTilingData)) != EOK,
68 OP_LOGE(context, "set tiling data error"), return ge::GRAPH_FAILED);68 OP_LOGE(context, "set tiling data error"), return ge::GRAPH_FAILED);
69 69 
70- OP_CHECK_IF(tensorNum > MAX_TENSOR_NUM, OP_LOGE(context, "tensorNum should be less than or equal to 256"),70+ OP_CHECK_IF(tensorNum > MAX_TENSOR_NUM,
71+ OP_LOGE(context, "tensorNum[%lu] should be less than or equal to %u", tensorNum, MAX_TENSOR_NUM),
71 return ge::GRAPH_FAILED);72 return ge::GRAPH_FAILED);
72 tiling->tensorCount = static_cast<int32_t>(tensorNum);73 tiling->tensorCount = static_cast<int32_t>(tensorNum);
73 int64_t totalElements = 0;74 int64_t totalElements = 0;
@@ -57,7 +57,7 @@ static inline bool CheckFormat(const aclTensorList* x1, const aclTensorList* x2,
57 for (uint64_t i = 0; i < x1->Size(); i++) {57 for (uint64_t i = 0; i < x1->Size(); i++) {
58 if (IsPrivateFormat((*out)[i]->GetStorageFormat()) || IsPrivateFormat((*x1)[i]->GetStorageFormat()) ||58 if (IsPrivateFormat((*out)[i]->GetStorageFormat()) || IsPrivateFormat((*x1)[i]->GetStorageFormat()) ||
59 IsPrivateFormat((*x2)[i]->GetStorageFormat()) || IsPrivateFormat((*weight)[i]->GetStorageFormat())) {59 IsPrivateFormat((*x2)[i]->GetStorageFormat()) || IsPrivateFormat((*weight)[i]->GetStorageFormat())) {
60- OP_LOGE(ACLNN_ERR_PARAM_INVALID, "Format only support NDNCHWNHWCHWCNNDHWCNCDHW.");60+ OP_LOGE(ACLNN_ERR_PARAM_INVALID, "Format only support ND, NCHW, NHWC, HWCN, NDHWC, NCDHW.");
61 return false;61 return false;
62 }62 }
63 }63 }
@@ -90,7 +90,7 @@ static inline bool CheckFormat(const aclTensorList* x1, const aclTensorList* x2,
90 for (uint64_t i = 0; i < x1->Size(); i++) {90 for (uint64_t i = 0; i < x1->Size(); i++) {
91 if (IsPrivateFormat((*out)[i]->GetStorageFormat()) || IsPrivateFormat((*x1)[i]->GetStorageFormat()) ||91 if (IsPrivateFormat((*out)[i]->GetStorageFormat()) || IsPrivateFormat((*x1)[i]->GetStorageFormat()) ||
92 IsPrivateFormat((*x2)[i]->GetStorageFormat())) {92 IsPrivateFormat((*x2)[i]->GetStorageFormat())) {
93- OP_LOGE(ACLNN_ERR_PARAM_INVALID, "Format only support NDNCHWNHWCHWCNNDHWCNCDHW.");93+ OP_LOGE(ACLNN_ERR_PARAM_INVALID, "Format only support ND, NCHW, NHWC, HWCN, NDHWC, NCDHW.");
94 return false;94 return false;
95 }95 }
96 }96 }
@@ -71,7 +71,8 @@ static ge::graphStatus ForeachLogTilingFunc(gert::TilingContext* context)
71 OP_CHECK_IF(memset_s(tiling, sizeof(ForeachLogTilingData), 0, sizeof(ForeachLogTilingData)) != EOK,71 OP_CHECK_IF(memset_s(tiling, sizeof(ForeachLogTilingData), 0, sizeof(ForeachLogTilingData)) != EOK,
72 OP_LOGE(context, "set tiling data error"), return ge::GRAPH_FAILED);72 OP_LOGE(context, "set tiling data error"), return ge::GRAPH_FAILED);
73 73 
74- OP_CHECK_IF(tensorNum > MAX_TENSOR_NUM, OP_LOGE(context, "tensorNum should be less than or equal to 256"),74+ OP_CHECK_IF(tensorNum > MAX_TENSOR_NUM,
75+ OP_LOGE(context, "tensorNum[%lu] should be less than or equal to %u", tensorNum, MAX_TENSOR_NUM),
75 return ge::GRAPH_FAILED);76 return ge::GRAPH_FAILED);
76 tiling->tensorCount = static_cast<int32_t>(tensorNum);77 tiling->tensorCount = static_cast<int32_t>(tensorNum);
77 int64_t totalElements = 0;78 int64_t totalElements = 0;
@@ -69,7 +69,8 @@ static ge::graphStatus ForeachLog10TilingFunc(gert::TilingContext* context)
69 OP_CHECK_IF(memset_s(tiling, sizeof(ForeachLog10TilingData), 0, sizeof(ForeachLog10TilingData)) != EOK,69 OP_CHECK_IF(memset_s(tiling, sizeof(ForeachLog10TilingData), 0, sizeof(ForeachLog10TilingData)) != EOK,
70 OP_LOGE(context, "set tiling data error"), return ge::GRAPH_FAILED);70 OP_LOGE(context, "set tiling data error"), return ge::GRAPH_FAILED);
71 71 
72- OP_CHECK_IF(tensorNum > MAX_TENSOR_NUM, OP_LOGE(context, "tensorNum should be less than or equal to 256"),72+ OP_CHECK_IF(tensorNum > MAX_TENSOR_NUM,
73+ OP_LOGE(context, "tensorNum[%lu] should be less than or equal to %u", tensorNum, MAX_TENSOR_NUM),
73 return ge::GRAPH_FAILED);74 return ge::GRAPH_FAILED);
74 tiling->tensorCount = static_cast<int32_t>(tensorNum);75 tiling->tensorCount = static_cast<int32_t>(tensorNum);
75 int64_t totalElements = 0;76 int64_t totalElements = 0;
@@ -71,7 +71,8 @@ static ge::graphStatus ForeachLog2TilingFunc(gert::TilingContext* context)
71 OP_CHECK_IF(memset_s(tiling, sizeof(ForeachLog2TilingData), 0, sizeof(ForeachLog2TilingData)) != EOK,71 OP_CHECK_IF(memset_s(tiling, sizeof(ForeachLog2TilingData), 0, sizeof(ForeachLog2TilingData)) != EOK,
72 OP_LOGE(context, "set tiling data error"), return ge::GRAPH_FAILED);72 OP_LOGE(context, "set tiling data error"), return ge::GRAPH_FAILED);
73 73 
74- OP_CHECK_IF(tensorNum > MAX_TENSOR_NUM, OP_LOGE(context, "tensorNum should be less than or equal to 256"),74+ OP_CHECK_IF(tensorNum > MAX_TENSOR_NUM,
75+ OP_LOGE(context, "tensorNum[%lu] should be less than or equal to %u", tensorNum, MAX_TENSOR_NUM),
75 return ge::GRAPH_FAILED);76 return ge::GRAPH_FAILED);
76 tiling->tensorCount = static_cast<int32_t>(tensorNum);77 tiling->tensorCount = static_cast<int32_t>(tensorNum);
77 int64_t totalElements = 0;78 int64_t totalElements = 0;
@@ -72,7 +72,8 @@ static ge::graphStatus ForeachMaximumListTilingFunc(gert::TilingContext* context
72 OP_CHECK_IF(memset_s(tiling, sizeof(ForeachMaximumListTilingData), 0, sizeof(ForeachMaximumListTilingData)) != EOK,72 OP_CHECK_IF(memset_s(tiling, sizeof(ForeachMaximumListTilingData), 0, sizeof(ForeachMaximumListTilingData)) != EOK,
73 OP_LOGE(context, "set tiling data error"), return ge::GRAPH_FAILED);73 OP_LOGE(context, "set tiling data error"), return ge::GRAPH_FAILED);
74 74 
75- OP_CHECK_IF(tensorNum > MAX_TENSOR_NUM, OP_LOGE(context, "tensorNum should be less than or equal to 256"),75+ OP_CHECK_IF(tensorNum > MAX_TENSOR_NUM,
76+ OP_LOGE(context, "tensorNum[%lu] should be less than or equal to %u", tensorNum, MAX_TENSOR_NUM),
76 return ge::GRAPH_FAILED);77 return ge::GRAPH_FAILED);
77 for (uint64_t i = 0; i < tensorNum; i++) {78 for (uint64_t i = 0; i < tensorNum; i++) {
78 auto shapePtr = context->GetDynamicInputShape(INPUT_IDX_0, i);79 auto shapePtr = context->GetDynamicInputShape(INPUT_IDX_0, i);
@@ -74,7 +74,8 @@ static ge::graphStatus ForeachMaximumScalarTilingFunc(gert::TilingContext* conte
74 memset_s(tiling, sizeof(ForeachMaximumScalarTilingData), 0, sizeof(ForeachMaximumScalarTilingData)) != EOK,74 memset_s(tiling, sizeof(ForeachMaximumScalarTilingData), 0, sizeof(ForeachMaximumScalarTilingData)) != EOK,
75 OP_LOGE(context, "set tiling data error"), return ge::GRAPH_FAILED);75 OP_LOGE(context, "set tiling data error"), return ge::GRAPH_FAILED);
76 76 
77- OP_CHECK_IF(tensorNum > MAX_TENSOR_NUM, OP_LOGE(context, "tensorNum should be less than or equal to 256"),77+ OP_CHECK_IF(tensorNum > MAX_TENSOR_NUM,
78+ OP_LOGE(context, "tensorNum[%lu] should be less than or equal to %u", tensorNum, MAX_TENSOR_NUM),
78 return ge::GRAPH_FAILED);79 return ge::GRAPH_FAILED);
79 tiling->tensorCount = static_cast<int32_t>(tensorNum);80 tiling->tensorCount = static_cast<int32_t>(tensorNum);
80 int64_t totalElements = 0;81 int64_t totalElements = 0;
@@ -61,7 +61,7 @@ static inline bool CheckFormat(const aclTensorList* self, const aclTensorList* o
61 for (uint64_t k = 0; k < self->Size(); k++) {61 for (uint64_t k = 0; k < self->Size(); k++) {
62 // self格式不能是私有格式62 // self格式不能是私有格式
63 if (IsPrivateFormat((*self)[k]->GetStorageFormat()) || IsPrivateFormat((*out)[k]->GetStorageFormat())) {63 if (IsPrivateFormat((*self)[k]->GetStorageFormat()) || IsPrivateFormat((*out)[k]->GetStorageFormat())) {
64- OP_LOGE(ACLNN_ERR_PARAM_INVALID, "Format only support NDNCHWNHWCHWCNNDHWCNCDHW.");64+ OP_LOGE(ACLNN_ERR_PARAM_INVALID, "Format only support ND, NCHW, NHWC, HWCN, NDHWC, NCDHW.");
65 return false;65 return false;
66 }66 }
67 }67 }
@@ -70,7 +70,8 @@ static ge::graphStatus ForeachMaximumScalarListTilingFunc(gert::TilingContext* c
70 sizeof(ForeachMaximumScalarListTilingData)) != EOK,70 sizeof(ForeachMaximumScalarListTilingData)) != EOK,
71 OP_LOGE(context, "set tiling data error"), return ge::GRAPH_FAILED);71 OP_LOGE(context, "set tiling data error"), return ge::GRAPH_FAILED);
72 72 
73- OP_CHECK_IF(tensorNum > MAX_TENSOR_NUM, OP_LOGE(context, "tensorNum should be less than or equal to 256"),73+ OP_CHECK_IF(tensorNum > MAX_TENSOR_NUM,
74+ OP_LOGE(context, "tensorNum[%lu] should be less than or equal to %u", tensorNum, MAX_TENSOR_NUM),
74 return ge::GRAPH_FAILED);75 return ge::GRAPH_FAILED);
75 tiling->tensorCount = static_cast<int32_t>(tensorNum);76 tiling->tensorCount = static_cast<int32_t>(tensorNum);
76 int64_t totalElements = 0;77 int64_t totalElements = 0;
@@ -69,7 +69,8 @@ static ge::graphStatus ForeachMinimumListTilingFunc(gert::TilingContext* context
69 OP_CHECK_IF(memset_s(tiling, sizeof(ForeachMinimumListTilingData), 0, sizeof(ForeachMinimumListTilingData)) != EOK,69 OP_CHECK_IF(memset_s(tiling, sizeof(ForeachMinimumListTilingData), 0, sizeof(ForeachMinimumListTilingData)) != EOK,
70 OP_LOGE(context, "set tiling data error"), return ge::GRAPH_FAILED);70 OP_LOGE(context, "set tiling data error"), return ge::GRAPH_FAILED);
71 71 
72- OP_CHECK_IF(tensorNum > MAX_TENSOR_NUM, OP_LOGE(context, "tensorNum should be less than or equal to 256"),72+ OP_CHECK_IF(tensorNum > MAX_TENSOR_NUM,
73+ OP_LOGE(context, "tensorNum[%lu] should be less than or equal to %u", tensorNum, MAX_TENSOR_NUM),
73 return ge::GRAPH_FAILED);74 return ge::GRAPH_FAILED);
74 for (uint64_t i = 0; i < tensorNum; i++) {75 for (uint64_t i = 0; i < tensorNum; i++) {
75 auto shapePtr = context->GetDynamicInputShape(INPUT_IDX_0, i);76 auto shapePtr = context->GetDynamicInputShape(INPUT_IDX_0, i);
@@ -72,7 +72,8 @@ static ge::graphStatus ForeachMinimumScalarTilingFunc(gert::TilingContext* conte
72 memset_s(tiling, sizeof(ForeachMinimumScalarTilingData), 0, sizeof(ForeachMinimumScalarTilingData)) != EOK,72 memset_s(tiling, sizeof(ForeachMinimumScalarTilingData), 0, sizeof(ForeachMinimumScalarTilingData)) != EOK,
73 OP_LOGE(context, "set tiling data error"), return ge::GRAPH_FAILED);73 OP_LOGE(context, "set tiling data error"), return ge::GRAPH_FAILED);
74 74 
75- OP_CHECK_IF(tensorNum > MAX_TENSOR_NUM, OP_LOGE(context, "tensorNum should be less than or equal to 256"),75+ OP_CHECK_IF(tensorNum > MAX_TENSOR_NUM,
76+ OP_LOGE(context, "tensorNum[%lu] should be less than or equal to %u", tensorNum, MAX_TENSOR_NUM),
76 return ge::GRAPH_FAILED);77 return ge::GRAPH_FAILED);
77 tiling->tensorCount = static_cast<int32_t>(tensorNum);78 tiling->tensorCount = static_cast<int32_t>(tensorNum);
78 int64_t totalElements = 0;79 int64_t totalElements = 0;
@@ -61,7 +61,7 @@ static inline bool CheckFormat(const aclTensorList* self, const aclTensorList* o
61 for (uint64_t m = 0; m < self->Size(); m++) {61 for (uint64_t m = 0; m < self->Size(); m++) {
62 // self格式不能是私有格式62 // self格式不能是私有格式
63 if (IsPrivateFormat((*self)[m]->GetStorageFormat()) || IsPrivateFormat((*out)[m]->GetStorageFormat())) {63 if (IsPrivateFormat((*self)[m]->GetStorageFormat()) || IsPrivateFormat((*out)[m]->GetStorageFormat())) {
64- OP_LOGE(ACLNN_ERR_PARAM_INVALID, "Format only support NDNCHWNHWCHWCNNDHWCNCDHW.");64+ OP_LOGE(ACLNN_ERR_PARAM_INVALID, "Format only support ND, NCHW, NHWC, HWCN, NDHWC, NCDHW.");
65 return false;65 return false;
66 }66 }
67 }67 }
@@ -70,7 +70,8 @@ static ge::graphStatus ForeachMinimumScalarListTilingFunc(gert::TilingContext* c
70 sizeof(ForeachMinimumScalarListTilingData)) != EOK,70 sizeof(ForeachMinimumScalarListTilingData)) != EOK,
71 OP_LOGE(context, "set tiling data error"), return ge::GRAPH_FAILED);71 OP_LOGE(context, "set tiling data error"), return ge::GRAPH_FAILED);
72 72 
73- OP_CHECK_IF(tensorNum > MAX_TENSOR_NUM, OP_LOGE(context, "tensorNum should be less than or equal to 256"),73+ OP_CHECK_IF(tensorNum > MAX_TENSOR_NUM,
74+ OP_LOGE(context, "tensorNum[%lu] should be less than or equal to %u", tensorNum, MAX_TENSOR_NUM),
74 return ge::GRAPH_FAILED);75 return ge::GRAPH_FAILED);
75 tiling->tensorCount = static_cast<int32_t>(tensorNum);76 tiling->tensorCount = static_cast<int32_t>(tensorNum);
76 int64_t totalElements = 0;77 int64_t totalElements = 0;
@@ -75,7 +75,8 @@ static ge::graphStatus ForeachMulListTilingFunc(gert::TilingContext* context)
75 OP_CHECK_IF(memset_s(tiling, sizeof(ForeachMulListTilingData), 0, sizeof(ForeachMulListTilingData)) != EOK,75 OP_CHECK_IF(memset_s(tiling, sizeof(ForeachMulListTilingData), 0, sizeof(ForeachMulListTilingData)) != EOK,
76 OP_LOGE(context, "set tiling data error"), return ge::GRAPH_FAILED);76 OP_LOGE(context, "set tiling data error"), return ge::GRAPH_FAILED);
77 77 
78- OP_CHECK_IF(tensorNum > MAX_TENSOR_NUM, OP_LOGE(context, "tensorNum should be less than or equal to 256"),78+ OP_CHECK_IF(tensorNum > MAX_TENSOR_NUM,
79+ OP_LOGE(context, "tensorNum[%lu] should be less than or equal to %u", tensorNum, MAX_TENSOR_NUM),
79 return ge::GRAPH_FAILED);80 return ge::GRAPH_FAILED);
80 for (uint64_t i = 0; i < tensorNum; i++) {81 for (uint64_t i = 0; i < tensorNum; i++) {
81 auto shapePtr = context->GetDynamicInputShape(INPUT_IDX_0, i);82 auto shapePtr = context->GetDynamicInputShape(INPUT_IDX_0, i);
@@ -45,7 +45,7 @@ static inline bool CheckFormat(const aclTensorList* x1, const aclTensorList* x2,
45 for (uint64_t i = 0; i < x1->Size(); i++) {45 for (uint64_t i = 0; i < x1->Size(); i++) {
46 if (IsPrivateFormat((*out)[i]->GetStorageFormat()) || IsPrivateFormat((*x1)[i]->GetStorageFormat()) ||46 if (IsPrivateFormat((*out)[i]->GetStorageFormat()) || IsPrivateFormat((*x1)[i]->GetStorageFormat()) ||
47 IsPrivateFormat((*x2)[i]->GetStorageFormat())) {47 IsPrivateFormat((*x2)[i]->GetStorageFormat())) {
48- OP_LOGE(ACLNN_ERR_PARAM_INVALID, "Format only support NDNCHWNHWCHWCNNDHWCNCDHW.");48+ OP_LOGE(ACLNN_ERR_PARAM_INVALID, "Format only support ND, NCHW, NHWC, HWCN, NDHWC, NCDHW.");
49 return false;49 return false;
50 }50 }
51 }51 }
@@ -52,7 +52,7 @@ static inline bool CheckFormat(const aclTensorList* self, const aclTensorList* o
52 for (uint64_t j = 0; j < self->Size(); j++) {52 for (uint64_t j = 0; j < self->Size(); j++) {
53 // self格式不能是私有格式53 // self格式不能是私有格式
54 if (IsPrivateFormat((*self)[j]->GetStorageFormat()) || IsPrivateFormat((*out)[j]->GetStorageFormat())) {54 if (IsPrivateFormat((*self)[j]->GetStorageFormat()) || IsPrivateFormat((*out)[j]->GetStorageFormat())) {
55- OP_LOGE(ACLNN_ERR_PARAM_INVALID, "Format only support NDNCHWNHWCHWCNNDHWCNCDHW.");55+ OP_LOGE(ACLNN_ERR_PARAM_INVALID, "Format only support ND, NCHW, NHWC, HWCN, NDHWC, NCDHW.");
56 return false;56 return false;
57 }57 }
58 }58 }
@@ -64,7 +64,7 @@ static const std::initializer_list<DataType>& GetDtypeSupportList()
64 if (GetCurrentPlatformInfo().GetCurNpuArch() == NpuArch::DAV_2201 || Ops::NN::AclnnUtil::IsRegbase()) {64 if (GetCurrentPlatformInfo().GetCurNpuArch() == NpuArch::DAV_2201 || Ops::NN::AclnnUtil::IsRegbase()) {
65 return TENSOR_DTYPE_DTYPE_SUPPORT_LIST;65 return TENSOR_DTYPE_DTYPE_SUPPORT_LIST;
66 } else {66 } else {
67- OP_LOGE(ACLNN_ERR_RUNTIME_ERROR, "support for %s is not implemented",67+ OP_LOGE(ACLNN_ERR_RUNTIME_ERROR, "support for arch %u is not implemented",
68 static_cast<uint32_t>(GetCurrentPlatformInfo().GetCurNpuArch()));68 static_cast<uint32_t>(GetCurrentPlatformInfo().GetCurNpuArch()));
69 return EMPTY_LIST;69 return EMPTY_LIST;
70 }70 }
@@ -74,7 +74,7 @@ static inline bool CheckDtype(const aclTensorList* self, const aclScalar* scalar
74{74{
75 const auto& dtypeSupportList = GetDtypeSupportList();75 const auto& dtypeSupportList = GetDtypeSupportList();
76 if (dtypeSupportList.size() == 0) {76 if (dtypeSupportList.size() == 0) {
77- OP_LOGE(ACLNN_ERR_PARAM_INVALID, "support for %s is not implemented",77+ OP_LOGE(ACLNN_ERR_PARAM_INVALID, "support for arch %u is not implemented",
78 static_cast<uint32_t>(GetCurrentPlatformInfo().GetCurNpuArch()));78 static_cast<uint32_t>(GetCurrentPlatformInfo().GetCurNpuArch()));
79 return false;79 return false;
80 }80 }
@@ -35,7 +35,7 @@ constexpr int64_t DOUBLE_BUFFER = 2;
35class ForeachNonFiniteCheckAndUnscaleRegbaseTiling : public ForeachNonFiniteCheckAndUnscaleBaseClass {35class ForeachNonFiniteCheckAndUnscaleRegbaseTiling : public ForeachNonFiniteCheckAndUnscaleBaseClass {
36public:36public:
37 explicit ForeachNonFiniteCheckAndUnscaleRegbaseTiling(gert::TilingContext* context)37 explicit ForeachNonFiniteCheckAndUnscaleRegbaseTiling(gert::TilingContext* context)
38- : ForeachNonFiniteCheckAndUnscaleBaseClass(context){};38+ : ForeachNonFiniteCheckAndUnscaleBaseClass(context) {};
39 ~ForeachNonFiniteCheckAndUnscaleRegbaseTiling() override = default;39 ~ForeachNonFiniteCheckAndUnscaleRegbaseTiling() override = default;
40 void Reset(gert::TilingContext* context) override { ForeachNonFiniteCheckAndUnscaleBaseClass::Reset(context); }40 void Reset(gert::TilingContext* context) override { ForeachNonFiniteCheckAndUnscaleBaseClass::Reset(context); }
41 41 
@@ -128,7 +128,7 @@ ge::graphStatus ForeachNonFiniteCheckAndUnscaleRegbaseTiling::GetShapeAttrsInfo(
128 OP_LOGE_FOR_INVALID_DTYPE_WITH_REASON(128 OP_LOGE_FOR_INVALID_DTYPE_WITH_REASON(
129 nodeName_.c_str(), "scaled_grads", ge::TypeUtils::DataTypeToSerialString(tempDtype).c_str(),129 nodeName_.c_str(), "scaled_grads", ge::TypeUtils::DataTypeToSerialString(tempDtype).c_str(),
130 ("The dtypes of all tensors in the tensor list must be the same, expected " +130 ("The dtypes of all tensors in the tensor list must be the same, expected " +
131- ge::TypeUtils::DataTypeToSerialString(dataType_) + ".Currently, the dtype of scaled_grads[" +131+ ge::TypeUtils::DataTypeToSerialString(dataType_) + ". Currently, the dtype of scaled_grads[" +
132 std::to_string(i) + "] is inconsistent with that of other tensors")132 std::to_string(i) + "] is inconsistent with that of other tensors")
133 .c_str());133 .c_str());
134 return ge::GRAPH_FAILED;134 return ge::GRAPH_FAILED;
@@ -39,7 +39,7 @@ constexpr uint32_t COEFFICIENT_OF_NON_FLOAT = COEFFICIENT_OF_FLOAT * 3;
39class ForeachNonFiniteCheckAndUnscaleTiling {39class ForeachNonFiniteCheckAndUnscaleTiling {
40public:40public:
41 explicit ForeachNonFiniteCheckAndUnscaleTiling(gert::TilingContext* context)41 explicit ForeachNonFiniteCheckAndUnscaleTiling(gert::TilingContext* context)
42- : tilingContext(context), nodeName(context->GetNodeName()){};42+ : tilingContext(context), nodeName(context->GetNodeName()) {};
43 43 
44 ge::graphStatus Init();44 ge::graphStatus Init();
45 ge::graphStatus RunBigKernelTiling();45 ge::graphStatus RunBigKernelTiling();
@@ -108,7 +108,7 @@ ge::graphStatus ForeachNonFiniteCheckAndUnscaleTiling::Init()
108 OP_LOGE_FOR_INVALID_DTYPE_WITH_REASON(108 OP_LOGE_FOR_INVALID_DTYPE_WITH_REASON(
109 nodeName.c_str(), "scaled_grads", ge::TypeUtils::DataTypeToSerialString(tempDtype).c_str(),109 nodeName.c_str(), "scaled_grads", ge::TypeUtils::DataTypeToSerialString(tempDtype).c_str(),
110 ("The dtypes of all tensors in tensor list scaled_grads must be the same, expected " +110 ("The dtypes of all tensors in tensor list scaled_grads must be the same, expected " +
111- ge::TypeUtils::DataTypeToSerialString(dataType) + ".Currently, the dtype of scaled_grads[" +111+ ge::TypeUtils::DataTypeToSerialString(dataType) + ". Currently, the dtype of scaled_grads[" +
112 std::to_string(i) + "] is inconsistent with that of other tensors")112 std::to_string(i) + "] is inconsistent with that of other tensors")
113 .c_str());113 .c_str());
114 return ge::GRAPH_FAILED;114 return ge::GRAPH_FAILED;
@@ -359,4 +359,4 @@ protected:
359};359};
360 360 
361REGISTER_OPS_TILING_TEMPLATE(ForeachNonFiniteCheckAndUnscale, ForeachNonFiniteCheckAndUnscaleMembaseTiling, 10000);361REGISTER_OPS_TILING_TEMPLATE(ForeachNonFiniteCheckAndUnscale, ForeachNonFiniteCheckAndUnscaleMembaseTiling, 10000);
362-} // namespace optiling362+} // namespace optiling
@@ -71,7 +71,8 @@ static ge::graphStatus ForeachPowScalarTilingFunc(gert::TilingContext* context)
71 OP_CHECK_IF(memset_s(tiling, sizeof(ForeachPowScalarTilingData), 0, sizeof(ForeachPowScalarTilingData)) != EOK,71 OP_CHECK_IF(memset_s(tiling, sizeof(ForeachPowScalarTilingData), 0, sizeof(ForeachPowScalarTilingData)) != EOK,
72 OP_LOGE(context, "set tiling data error"), return ge::GRAPH_FAILED);72 OP_LOGE(context, "set tiling data error"), return ge::GRAPH_FAILED);
73 73 
74- OP_CHECK_IF(tensorNum > MAX_TENSOR_NUM, OP_LOGE(context, "tensorNum should be less than or equal to 256"),74+ OP_CHECK_IF(tensorNum > MAX_TENSOR_NUM,
75+ OP_LOGE(context, "tensorNum[%lu] should be less than or equal to %u", tensorNum, MAX_TENSOR_NUM),
75 return ge::GRAPH_FAILED);76 return ge::GRAPH_FAILED);
76 tiling->tensorCount = static_cast<int32_t>(tensorNum);77 tiling->tensorCount = static_cast<int32_t>(tensorNum);
77 int64_t totalElements = 0;78 int64_t totalElements = 0;
@@ -50,7 +50,7 @@ static inline bool CheckFormat(const aclTensorList* self, const aclTensorList* o
50 for (uint64_t i = 0; i < self->Size(); i++) {50 for (uint64_t i = 0; i < self->Size(); i++) {
51 // self格式不能是私有格式51 // self格式不能是私有格式
52 if (IsPrivateFormat((*self)[i]->GetStorageFormat()) || IsPrivateFormat((*out)[i]->GetStorageFormat())) {52 if (IsPrivateFormat((*self)[i]->GetStorageFormat()) || IsPrivateFormat((*out)[i]->GetStorageFormat())) {
53- OP_LOGE(ACLNN_ERR_PARAM_INVALID, "Format only support NDNCHWNHWCHWCNNDHWCNCDHW.");53+ OP_LOGE(ACLNN_ERR_PARAM_INVALID, "Format only support ND, NCHW, NHWC, HWCN, NDHWC, NCDHW.");
54 return false;54 return false;
55 }55 }
56 }56 }
@@ -125,7 +125,8 @@ static ge::graphStatus ForeachPowScalarAndTensorTilingFunc(gert::TilingContext*
125 OP_CHECK_IF(memset_s(tiling, sizeof(ForeachPowScalarAndTensorTilingData), 0,125 OP_CHECK_IF(memset_s(tiling, sizeof(ForeachPowScalarAndTensorTilingData), 0,
126 sizeof(ForeachPowScalarAndTensorTilingData)) != EOK,126 sizeof(ForeachPowScalarAndTensorTilingData)) != EOK,
127 OP_LOGE(context, "set tiling data error"), return ge::GRAPH_FAILED);127 OP_LOGE(context, "set tiling data error"), return ge::GRAPH_FAILED);
128- OP_CHECK_IF(tensorNum > static_cast<uint64_t>(MAX_TENSOR_NUM), OP_LOGE(context, "tensorNum exceeds MAX_TENSOR_NUM"),128+ OP_CHECK_IF(tensorNum > static_cast<uint64_t>(MAX_TENSOR_NUM),
129+ OP_LOGE(context, "tensorNum[%lu] exceeds MAX_TENSOR_NUM[%u]", tensorNum, MAX_TENSOR_NUM),
129 return ge::GRAPH_FAILED);130 return ge::GRAPH_FAILED);
130 131 
131 int64_t totalElements = 0;132 int64_t totalElements = 0;
@@ -67,7 +67,7 @@ static inline bool CheckFormat(const aclTensorList* self, const aclTensorList* o
67 for (uint64_t i = 0; i < self->Size(); i++) {67 for (uint64_t i = 0; i < self->Size(); i++) {
68 // self格式不能是私有格式68 // self格式不能是私有格式
69 if (IsPrivateFormat((*self)[i]->GetStorageFormat()) || IsPrivateFormat((*out)[i]->GetStorageFormat())) {69 if (IsPrivateFormat((*self)[i]->GetStorageFormat()) || IsPrivateFormat((*out)[i]->GetStorageFormat())) {
70- OP_LOGE(ACLNN_ERR_PARAM_INVALID, "Format only support NDNCHWNHWCHWCNNDHWCNCDHW.");70+ OP_LOGE(ACLNN_ERR_PARAM_INVALID, "Format only support ND, NCHW, NHWC, HWCN, NDHWC, NCDHW.");
71 return false;71 return false;
72 }72 }
73 }73 }
@@ -43,7 +43,7 @@ static inline bool CheckFormat(const aclTensorList* self, const aclTensorList* o
43 for (uint64_t i = 0; i < self->Size(); i++) {43 for (uint64_t i = 0; i < self->Size(); i++) {
44 // self格式不能是私有格式44 // self格式不能是私有格式
45 if (IsPrivateFormat((*self)[i]->GetStorageFormat()) || IsPrivateFormat((*out)[i]->GetStorageFormat())) {45 if (IsPrivateFormat((*self)[i]->GetStorageFormat()) || IsPrivateFormat((*out)[i]->GetStorageFormat())) {
46- OP_LOGE(ACLNN_ERR_PARAM_INVALID, "Format only support NDNCHWNHWCHWCNNDHWCNCDHW.");46+ OP_LOGE(ACLNN_ERR_PARAM_INVALID, "Format only support ND, NCHW, NHWC, HWCN, NDHWC, NCDHW.");
47 return false;47 return false;
48 }48 }
49 }49 }
@@ -69,7 +69,8 @@ static ge::graphStatus ForeachSubListTilingFunc(gert::TilingContext* context)
69 OP_CHECK_IF(memset_s(tiling, sizeof(ForeachSubListTilingData), 0, sizeof(ForeachSubListTilingData)) != EOK,69 OP_CHECK_IF(memset_s(tiling, sizeof(ForeachSubListTilingData), 0, sizeof(ForeachSubListTilingData)) != EOK,
70 OP_LOGE(context, "set tiling data error"), return ge::GRAPH_FAILED);70 OP_LOGE(context, "set tiling data error"), return ge::GRAPH_FAILED);
71 71 
72- OP_CHECK_IF(tensorNum > MAX_TENSOR_NUM, OP_LOGE(context, "tensorNum should be less than or equal to 256"),72+ OP_CHECK_IF(tensorNum > MAX_TENSOR_NUM,
73+ OP_LOGE(context, "tensorNum[%lu] should be less than or equal to %u", tensorNum, MAX_TENSOR_NUM),
73 return ge::GRAPH_FAILED);74 return ge::GRAPH_FAILED);
74 tiling->tensorCount = static_cast<int32_t>(tensorNum);75 tiling->tensorCount = static_cast<int32_t>(tensorNum);
75 int64_t totalElements = 0;76 int64_t totalElements = 0;
@@ -67,7 +67,7 @@ static inline bool CheckFormat(const aclTensorList* self, const aclTensorList* x
67 // self格式不能是私有格式67 // self格式不能是私有格式
68 if (IsPrivateFormat((*self)[i]->GetStorageFormat()) || IsPrivateFormat((*x2)[i]->GetStorageFormat()) ||68 if (IsPrivateFormat((*self)[i]->GetStorageFormat()) || IsPrivateFormat((*x2)[i]->GetStorageFormat()) ||
69 IsPrivateFormat((*out)[i]->GetStorageFormat())) {69 IsPrivateFormat((*out)[i]->GetStorageFormat())) {
70- OP_LOGE(ACLNN_ERR_PARAM_INVALID, "Format only support NDNCHWNHWCHWCNNDHWCNCDHW.");70+ OP_LOGE(ACLNN_ERR_PARAM_INVALID, "Format only support ND, NCHW, NHWC, HWCN, NDHWC, NCDHW.");
71 return false;71 return false;
72 }72 }
73 }73 }
@@ -68,7 +68,8 @@ static ge::graphStatus ForeachSubScalarTilingFunc(gert::TilingContext* context)
68 OP_CHECK_IF(memset_s(tiling, sizeof(ForeachSubScalarTilingData), 0, sizeof(ForeachSubScalarTilingData)) != EOK,68 OP_CHECK_IF(memset_s(tiling, sizeof(ForeachSubScalarTilingData), 0, sizeof(ForeachSubScalarTilingData)) != EOK,
69 OP_LOGE(context, "set tiling data error"), return ge::GRAPH_FAILED);69 OP_LOGE(context, "set tiling data error"), return ge::GRAPH_FAILED);
70 70 
71- OP_CHECK_IF(tensorNum > MAX_TENSOR_NUM, OP_LOGE(context, "tensorNum should be less than or equal to 256"),71+ OP_CHECK_IF(tensorNum > MAX_TENSOR_NUM,
72+ OP_LOGE(context, "tensorNum[%lu] should be less than or equal to %u", tensorNum, MAX_TENSOR_NUM),
72 return ge::GRAPH_FAILED);73 return ge::GRAPH_FAILED);
73 tiling->tensorCount = static_cast<int32_t>(tensorNum);74 tiling->tensorCount = static_cast<int32_t>(tensorNum);
74 int64_t totalElements = 0;75 int64_t totalElements = 0;
@@ -61,7 +61,7 @@ static inline bool CheckFormat(const aclTensorList* self, const aclTensorList* o
61 61 
62 // self格式不能是私有格式62 // self格式不能是私有格式
63 if (IsPrivateFormat((*self)[i]->GetStorageFormat())) {63 if (IsPrivateFormat((*self)[i]->GetStorageFormat())) {
64- OP_LOGE(ACLNN_ERR_PARAM_INVALID, "Format only support NDNCHWNHWCHWCNNDHWCNCDHW.");64+ OP_LOGE(ACLNN_ERR_PARAM_INVALID, "Format only support ND, NCHW, NHWC, HWCN, NDHWC, NCDHW.");
65 return false;65 return false;
66 }66 }
67 }67 }
@@ -70,7 +70,8 @@ static ge::graphStatus ForeachSubScalarListTilingFunc(gert::TilingContext* conte
70 memset_s(tiling, sizeof(ForeachSubScalarListTilingData), 0, sizeof(ForeachSubScalarListTilingData)) != EOK,70 memset_s(tiling, sizeof(ForeachSubScalarListTilingData), 0, sizeof(ForeachSubScalarListTilingData)) != EOK,
71 OP_LOGE(context, "set tiling data error"), return ge::GRAPH_FAILED);71 OP_LOGE(context, "set tiling data error"), return ge::GRAPH_FAILED);
72 72 
73- OP_CHECK_IF(tensorNum > MAX_TENSOR_NUM, OP_LOGE(context, "tensorNum should be less than or equal to 256"),73+ OP_CHECK_IF(tensorNum > MAX_TENSOR_NUM,
74+ OP_LOGE(context, "tensorNum[%lu] should be less than or equal to %u", tensorNum, MAX_TENSOR_NUM),
74 return ge::GRAPH_FAILED);75 return ge::GRAPH_FAILED);
75 tiling->tensorCount = static_cast<int32_t>(tensorNum);76 tiling->tensorCount = static_cast<int32_t>(tensorNum);
76 int64_t totalElements = 0;77 int64_t totalElements = 0;
@@ -31,7 +31,7 @@ static ge::graphStatus InferShape4ForeachCommon(gert::InferShapeContext* context
31 }31 }
32 32 
33 std::string errMsg = optiling::ConcatString("num of dynamic input0 ", inputInfoInferShape->GetInstanceNum(),33 std::string errMsg = optiling::ConcatString("num of dynamic input0 ", inputInfoInferShape->GetInstanceNum(),
34- "not equal num of dynamic output0 ", outputNumInferShape);34+ " is not equal to num of dynamic output0 ", outputNumInferShape);
35 OP_CHECK_IF(inputInfoInferShape->GetInstanceNum() != outputNumInferShape,35 OP_CHECK_IF(inputInfoInferShape->GetInstanceNum() != outputNumInferShape,
36 OP_LOGE(context->GetNodeName(), "%s", errMsg.c_str()), return ge::GRAPH_FAILED);36 OP_LOGE(context->GetNodeName(), "%s", errMsg.c_str()), return ge::GRAPH_FAILED);
37 37 
@@ -55,7 +55,7 @@ static ge::graphStatus InferDataType4ForeachCommon(gert::InferDataTypeContext* c
55 }55 }
56 56 
57 std::string errMsg = optiling::ConcatString("num of dynamic input0 ", inputInfoDataType->GetInstanceNum(),57 std::string errMsg = optiling::ConcatString("num of dynamic input0 ", inputInfoDataType->GetInstanceNum(),
58- "not equal num of dynamic output0 ", outputNumDataType);58+ " is not equal to num of dynamic output0 ", outputNumDataType);
59 OP_CHECK_IF(inputInfoDataType->GetInstanceNum() != outputNumDataType,59 OP_CHECK_IF(inputInfoDataType->GetInstanceNum() != outputNumDataType,
60 OP_LOGE(context->GetNodeName(), "%s", errMsg.c_str()), return ge::GRAPH_FAILED);60 OP_LOGE(context->GetNodeName(), "%s", errMsg.c_str()), return ge::GRAPH_FAILED);
61 61 
@@ -331,4 +331,4 @@ IMPL_OP_INFERSHAPE(ForeachLerpScalar)
331 .InferShape(ops::InferShape4ForeachCommon)331 .InferShape(ops::InferShape4ForeachCommon)
332 .InferDataType(ops::InferDataType4ForeachCommon);332 .InferDataType(ops::InferDataType4ForeachCommon);
333 333 
334-} // namespace ops334+} // namespace ops
@@ -38,7 +38,7 @@ constexpr int32_t MAX_SUPPORT_DIMS_NUMS = 8;
38 38 
39class ForeachReduceTiling {39class ForeachReduceTiling {
40public:40public:
41- explicit ForeachReduceTiling(gert::TilingContext* context) : tilingContext(context){};41+ explicit ForeachReduceTiling(gert::TilingContext* context) : tilingContext(context) {};
42 /**42 /**
43 ** function: Init43 ** function: Init
44 */44 */
@@ -403,7 +403,7 @@ static ge::graphStatus TilingPrepare4ForeachTiling(gert::TilingParseContext* con
403 OP_CHECK_IF(platformInfoPtr == nullptr, OP_LOGE(context, "platformInfoPtr is null"), return ge::GRAPH_FAILED);403 OP_CHECK_IF(platformInfoPtr == nullptr, OP_LOGE(context, "platformInfoPtr is null"), return ge::GRAPH_FAILED);
404 404 
405 auto compileInfoPtr = context->GetCompiledInfo<ForeachCompileInfo>();405 auto compileInfoPtr = context->GetCompiledInfo<ForeachCompileInfo>();
406- OP_CHECK_IF(platformInfoPtr == nullptr, OP_LOGE(context, "compileInfoPtr is null"), return ge::GRAPH_FAILED);406+ OP_CHECK_IF(compileInfoPtr == nullptr, OP_LOGE(context, "compileInfoPtr is null"), return ge::GRAPH_FAILED);
407 407 
408 auto ascendcPlatform = platform_ascendc::PlatformAscendC(platformInfoPtr);408 auto ascendcPlatform = platform_ascendc::PlatformAscendC(platformInfoPtr);
409 compileInfoPtr->coreNum = ascendcPlatform.GetCoreNum();409 compileInfoPtr->coreNum = ascendcPlatform.GetCoreNum();
@@ -390,12 +390,13 @@ ge::graphStatus ForeachRegbaseTiling::CheckOutput()
390 auto dstShape = context_->GetOutputShape(j);390 auto dstShape = context_->GetOutputShape(j);
391 OP_CHECK_IF(dstShape == nullptr, OP_LOGE(context_, "The output %u shape is null.", j), return ge::GRAPH_FAILED);391 OP_CHECK_IF(dstShape == nullptr, OP_LOGE(context_, "The output %u shape is null.", j), return ge::GRAPH_FAILED);
392 // check max dim392 // check max dim
393- OP_CHECK_IF(393+ OP_CHECK_IF(dstShape->GetStorageShape().GetDimNum() > MAX_SUPPORT_DIM_NUMS,
394- dstShape->GetStorageShape().GetDimNum() > MAX_SUPPORT_DIM_NUMS,394+ OP_LOGE_FOR_INVALID_SHAPEDIM_WITH_REASON(
395- OP_LOGE_FOR_INVALID_SHAPEDIM_WITH_REASON(395+ context_->GetNodeName(), "y", std::to_string(dstShape->GetStorageShape().GetDimNum()).c_str(),
396- context_->GetNodeName(), "y", std::to_string(dstShape->GetStorageShape().GetDimNum()).c_str(),396+ ("The shape dim of the " + std::to_string(j) +
397- ("The " + std::to_string(j) + "th tensor in tensor list y must be less than or equal to 8").c_str()),397+ "th tensor in tensor list y must be less than or equal to 8")
398- return ge::GRAPH_FAILED);398+ .c_str()),
399+ return ge::GRAPH_FAILED);
399 400 
400 if (srcShape->GetStorageShape() != dstShape->GetStorageShape() &&401 if (srcShape->GetStorageShape() != dstShape->GetStorageShape() &&
401 srcShape->GetStorageShape().GetShapeSize() > dstShape->GetStorageShape().GetShapeSize()) {402 srcShape->GetStorageShape().GetShapeSize() > dstShape->GetStorageShape().GetShapeSize()) {
@@ -363,7 +363,7 @@ private:
363 /**363 /**
364 ** function: Check scalar tensor shape invalid364 ** function: Check scalar tensor shape invalid
365 */365 */
366- ge::graphStatus CheckScalarTenorShapeInfo(size_t inputTensorsNum)366+ ge::graphStatus CheckScalarTensorShapeInfo(size_t inputTensorsNum)
367 {367 {
368 size_t irIndex = inputTensorsNum;368 size_t irIndex = inputTensorsNum;
369 if (opCode == FOREACH_POW_SCALAR_AND_TENSOR_OP_CODE) {369 if (opCode == FOREACH_POW_SCALAR_AND_TENSOR_OP_CODE) {
@@ -389,7 +389,7 @@ private:
389 /**389 /**
390 ** function: Check scalars tensor shape invalid390 ** function: Check scalars tensor shape invalid
391 */391 */
392- ge::graphStatus CheckScalarsTenorShapeInfo(size_t inputTensorsNum)392+ ge::graphStatus CheckScalarsTensorShapeInfo(size_t inputTensorsNum)
393 {393 {
394 size_t irIndex = inputTensorsNum;394 size_t irIndex = inputTensorsNum;
395 auto scalarsShape = tilingContext->GetRequiredInputShape(irIndex);395 auto scalarsShape = tilingContext->GetRequiredInputShape(irIndex);
@@ -514,13 +514,13 @@ private:
514 OP_LOGE(tilingContext->GetNodeName(), "CheckInputTensorlistShape failed."),514 OP_LOGE(tilingContext->GetNodeName(), "CheckInputTensorlistShape failed."),
515 return ge::GRAPH_FAILED);515 return ge::GRAPH_FAILED);
516 if (opInputType == ForeachInputType::TYPE_SCALAR) {516 if (opInputType == ForeachInputType::TYPE_SCALAR) {
517- OP_CHECK_IF(CheckScalarTenorShapeInfo(static_cast<size_t>(inputTensorsNum)) != ge::GRAPH_SUCCESS,517+ OP_CHECK_IF(CheckScalarTensorShapeInfo(static_cast<size_t>(inputTensorsNum)) != ge::GRAPH_SUCCESS,
518- OP_LOGE(tilingContext->GetNodeName(), "CheckScalarTenorShapeInfo failed."),518+ OP_LOGE(tilingContext->GetNodeName(), "CheckScalarTensorShapeInfo failed."),
519 return ge::GRAPH_FAILED);519 return ge::GRAPH_FAILED);
520 }520 }
521 if (opInputType == ForeachInputType::TYPE_SCALARS_TENSOR) {521 if (opInputType == ForeachInputType::TYPE_SCALARS_TENSOR) {
522- OP_CHECK_IF(CheckScalarsTenorShapeInfo(static_cast<size_t>(inputTensorsNum)) != ge::GRAPH_SUCCESS,522+ OP_CHECK_IF(CheckScalarsTensorShapeInfo(static_cast<size_t>(inputTensorsNum)) != ge::GRAPH_SUCCESS,
523- OP_LOGE(tilingContext->GetNodeName(), "CheckScalarsTenorShapeInfo failed."),523+ OP_LOGE(tilingContext->GetNodeName(), "CheckScalarsTensorShapeInfo failed."),
524 return ge::GRAPH_FAILED);524 return ge::GRAPH_FAILED);
525 }525 }
526 OP_CHECK_IF(CheckOutputShapeAndDtype() != ge::GRAPH_SUCCESS,526 OP_CHECK_IF(CheckOutputShapeAndDtype() != ge::GRAPH_SUCCESS,
@@ -180,7 +180,7 @@ static ge::graphStatus TilingPrepare4ForeachScalarTiling(gert::TilingParseContex
180 OP_CHECK_IF(platformInfoPtr == nullptr, OP_LOGE(context, "platformInfoPtr is null"), return ge::GRAPH_FAILED);180 OP_CHECK_IF(platformInfoPtr == nullptr, OP_LOGE(context, "platformInfoPtr is null"), return ge::GRAPH_FAILED);
181 181 
182 auto compileInfoPtr = context->GetCompiledInfo<ForeachCompileInfo>();182 auto compileInfoPtr = context->GetCompiledInfo<ForeachCompileInfo>();
183- OP_CHECK_IF(platformInfoPtr == nullptr, OP_LOGE(context, "compileInfoPtr is null"), return ge::GRAPH_FAILED);183+ OP_CHECK_IF(compileInfoPtr == nullptr, OP_LOGE(context, "compileInfoPtr is null"), return ge::GRAPH_FAILED);
184 184 
185 auto ascendcPlatform = platform_ascendc::PlatformAscendC(platformInfoPtr);185 auto ascendcPlatform = platform_ascendc::PlatformAscendC(platformInfoPtr);
186 compileInfoPtr->coreNum = ascendcPlatform.GetCoreNum();186 compileInfoPtr->coreNum = ascendcPlatform.GetCoreNum();