已合并
fix: softmax_grad_ext fusion pass 代码审查修复(memcpy_s 安全函数)、quant_update_scatter 原型重构、leaky_relu mask 调整、tiling 告警消除及 classify_rule 测试分类调整 #9190
yuanbin_22创建于 17 天前
fix: softmax_grad_ext fusion pass 代码审查修复(memcpy_s 安全函数)、quant_update_scatter 原型重构、leaky_relu mask 调整、tiling 告警消除及 classify_rule 测试分类调整 #9190
已合并
共 6 个文件变更+150-184
| @@ -35,7 +35,6 @@ struct LeakyReluCustom : public Vec::ElemwiseBinaryOP<T, T, float> { | |||
| 35 | { | 35 | { |
| 36 | 36 | ||
| 37 | uint32_t dtypeSize = sizeof(float); | 37 | uint32_t dtypeSize = sizeof(float); |
| 38 | - constexpr uint64_t VECTOR_REG_WIDTH = 256UL; | ||
| 39 | uint32_t vl = VECTOR_REG_WIDTH / dtypeSize; | 38 | uint32_t vl = VECTOR_REG_WIDTH / dtypeSize; |
| 40 | uint16_t loopNum = (count + vl - 1) / vl; | 39 | uint16_t loopNum = (count + vl - 1) / vl; |
| 41 | uint32_t vlSize = vl; | 40 | uint32_t vlSize = vl; |
| @@ -53,8 +52,8 @@ struct LeakyReluCustom : public Vec::ElemwiseBinaryOP<T, T, float> { | |||
| 53 | __VEC_SCOPE__ | 52 | __VEC_SCOPE__ |
| 54 | { | 53 | { |
| 55 | Reg::Duplicate(vregZero, 0.0f); | 54 | Reg::Duplicate(vregZero, 0.0f); |
| 56 | - mask = Reg::UpdateMask<float, Reg::RegTraitNumOne>(count); | ||
| 57 | for (uint16_t loopIdx = 0; loopIdx < loopNum; loopIdx++) { | 55 | for (uint16_t loopIdx = 0; loopIdx < loopNum; loopIdx++) { |
| 56 | + mask = Reg::UpdateMask<float, Reg::RegTraitNumOne>(count); | ||
| 58 | Reg::LoadAlign<T, Reg::LoadDist::DIST_NORM>(vregInputfloat, | 57 | Reg::LoadAlign<T, Reg::LoadDist::DIST_NORM>(vregInputfloat, |
| 59 | (__ubuf__ T*)(srcAddr + loopIdx * vlSize)); | 58 | (__ubuf__ T*)(srcAddr + loopIdx * vlSize)); |
| 60 | Reg::Muls(vregNegPart, vregInputfloat, negativeSlope, mask); | 59 | Reg::Muls(vregNegPart, vregInputfloat, negativeSlope, mask); |
| @@ -70,8 +69,8 @@ struct LeakyReluCustom : public Vec::ElemwiseBinaryOP<T, T, float> { | |||
| 70 | __VEC_SCOPE__ | 69 | __VEC_SCOPE__ |
| 71 | { | 70 | { |
| 72 | Reg::Duplicate(vregZero, 0.0f); | 71 | Reg::Duplicate(vregZero, 0.0f); |
| 73 | - mask = Reg::UpdateMask<float, Reg::RegTraitNumOne>(count); | ||
| 74 | for (uint16_t loopIdx = 0; loopIdx < loopNum; loopIdx++) { | 72 | for (uint16_t loopIdx = 0; loopIdx < loopNum; loopIdx++) { |
| 73 | + mask = Reg::UpdateMask<float, Reg::RegTraitNumOne>(count); | ||
| 75 | Reg::LoadAlign<T, Reg::LoadDist::DIST_UNPACK_B16>(vregInputT, | 74 | Reg::LoadAlign<T, Reg::LoadDist::DIST_UNPACK_B16>(vregInputT, |
| 76 | (__ubuf__ T*)(srcAddr + loopIdx * vlSize)); | 75 | (__ubuf__ T*)(srcAddr + loopIdx * vlSize)); |
| 77 | Reg::Cast<float, T, castTrait0>(vregInputfloat, vregInputT, mask); | 76 | Reg::Cast<float, T, castTrait0>(vregInputfloat, vregInputT, mask); |
| @@ -7,6 +7,7 @@ | |||
| 7 | * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. | 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. | 8 | * See LICENSE in the root of the software repository for the full text of the License. |
| 9 | */ | 9 | */ |
| 10 | + | ||
| 10 | 11 | ||
| 11 | 12 | ||
| 12 | 13 | ||
| @@ -29,11 +30,22 @@ const int64_t kSubgraphInputGrad = 0; | |||
| 29 | const int64_t kSubgraphInputX1 = 1; | 30 | const int64_t kSubgraphInputX1 = 1; |
| 30 | const int64_t kSubgraphInputX2 = 2; | 31 | const int64_t kSubgraphInputX2 = 2; |
| 31 | const int32_t kReduceSumAxesInputIdx = 1; | 32 | const int32_t kReduceSumAxesInputIdx = 1; |
| 33 | +const size_t kMinSubgraphInputCount = 3; | ||
| 34 | + | ||
| 35 | +const int64_t kUnknownShapeDim = -1; | ||
| 36 | +const int64_t kReduceLastAxis = -1; | ||
| 37 | +const int64_t kAxesShapeDim = 1; | ||
| 38 | +const int32_t kPatternV2VariantCount = 4; | ||
| 39 | +const int32_t kBinaryInputX1Idx = 0; | ||
| 40 | +const int32_t kBinaryInputX2Idx = 1; | ||
| 41 | +const int32_t kReduceSumInputXIdx = 0; | ||
| 42 | +const int32_t kNodeOutputIdx = 0; | ||
| 43 | +const std::string kTargetSocVersion = "Ascend950"; | ||
| 32 | 44 | ||
| 33 | bool IsUnknownShape(const std::vector<int64_t>& dims) | 45 | bool IsUnknownShape(const std::vector<int64_t>& dims) |
| 34 | { | 46 | { |
| 35 | for (auto dim : dims) { | 47 | for (auto dim : dims) { |
| 36 | - if (dim == -1) { | 48 | + if (dim == kUnknownShapeDim) { |
| 37 | return true; | 49 | return true; |
| 38 | } | 50 | } |
| 39 | } | 51 | } |
| @@ -49,8 +61,8 @@ bool IsTargetPlatform() | |||
| 49 | false, kPassName.c_str(), "Get platform_info failed."); | 61 | false, kPassName.c_str(), "Get platform_info failed."); |
| 50 | const std::string soc = platform_info.str_info.short_soc_version; | 62 | const std::string soc = platform_info.str_info.short_soc_version; |
| 51 | OPS_LOG_D(kPassName.c_str(), "Platform short soc: %s", soc.c_str()); | 63 | OPS_LOG_D(kPassName.c_str(), "Platform short soc: %s", soc.c_str()); |
| 52 | - if (soc != "Ascend950") { | 64 | + if (soc != kTargetSocVersion) { |
| 53 | - OPS_LOG_D(kPassName.c_str(), "Platform is not support, only support Ascend950."); | 65 | + OPS_LOG_D(kPassName.c_str(), "Platform is not support, only support %s.", kTargetSocVersion.c_str()); |
| 54 | return false; | 66 | return false; |
| 55 | } | 67 | } |
| 56 | return true; | 68 | return true; |
| @@ -108,9 +120,15 @@ bool GetAxisFromReduceSum(const GNode& sum_node, int64_t& axis_value, bool& keep | |||
| 108 | return false; | 120 | return false; |
| 109 | } | 121 | } |
| 110 | if (dtype == DT_INT64) { | 122 | if (dtype == DT_INT64) { |
| 111 | - axis_value = static_cast<int64_t>(*reinterpret_cast<const int64_t*>(data)); | 123 | + int64_t tmp = 0; |
| 124 | + auto memRet = memcpy_s(&tmp, sizeof(int64_t), data, sizeof(int64_t)); | ||
| 125 | + OP_LOGE_IF(memRet != EOK, false, kPassName.c_str(), "memcpy_s for int64 axes failed, ret=%d.", memRet); | ||
| 126 | + axis_value = tmp; | ||
| 112 | } else if (dtype == DT_INT32) { | 127 | } else if (dtype == DT_INT32) { |
| 113 | - axis_value = static_cast<int64_t>(*reinterpret_cast<const int32_t*>(data)); | 128 | + int32_t tmp = 0; |
| 129 | + auto memRet = memcpy_s(&tmp, sizeof(int32_t), data, sizeof(int32_t)); | ||
| 130 | + OP_LOGE_IF(memRet != EOK, false, kPassName.c_str(), "memcpy_s for int32 axes failed, ret=%d.", memRet); | ||
| 131 | + axis_value = tmp; | ||
| 114 | } else { | 132 | } else { |
| 115 | OPS_LOG_D(kPassName.c_str(), "ReduceSum axes dtype %d is not supported.", static_cast<int32_t>(dtype)); | 133 | OPS_LOG_D(kPassName.c_str(), "ReduceSum axes dtype %d is not supported.", static_cast<int32_t>(dtype)); |
| 116 | return false; | 134 | return false; |
| @@ -120,7 +138,7 @@ bool GetAxisFromReduceSum(const GNode& sum_node, int64_t& axis_value, bool& keep | |||
| 120 | OPS_LOG_D(kPassName.c_str(), "Failed to get keep_dims attr from ReduceSum."); | 138 | OPS_LOG_D(kPassName.c_str(), "Failed to get keep_dims attr from ReduceSum."); |
| 121 | return false; | 139 | return false; |
| 122 | } | 140 | } |
| 123 | - OPS_LOG_D(kPassName.c_str(), "ReduceSum axis=%ld, keep_dims=%d.", axis_value, static_cast<int32_t>(keep_dims)); | 141 | + OPS_LOG_D(kPassName.c_str(), "ReduceSum axis=%lld, keep_dims=%d.", axis_value, static_cast<int32_t>(keep_dims)); |
| 124 | return true; | 142 | return true; |
| 125 | } | 143 | } |
| 126 | 144 | ||
| @@ -199,15 +217,17 @@ es::EsTensorHolder BuildBinaryNode(es::EsGraphBuilder& graph_builder, const es:: | |||
| 199 | .IrDefOutputs({{"y", es::CompliantNodeBuilder::kEsIrOutputRequired, ""}}) | 217 | .IrDefOutputs({{"y", es::CompliantNodeBuilder::kEsIrOutputRequired, ""}}) |
| 200 | .Build(); | 218 | .Build(); |
| 201 | 219 | ||
| 202 | - es::AddEdgeAndUpdatePeerDesc(*graph, *input0.GetProducer(), input0.GetProducerOutIndex(), node, 0); | 220 | + ES_ASSERT_GRAPH_SUCCESS(es::AddEdgeAndUpdatePeerDesc(*graph, *input0.GetProducer(), input0.GetProducerOutIndex(), |
| 203 | - es::AddEdgeAndUpdatePeerDesc(*graph, *input1.GetProducer(), input1.GetProducerOutIndex(), node, 1); | 221 | + node, kBinaryInputX1Idx)); |
| 204 | - return es::EsTensorHolder(c_builder->GetTensorHolderFromNode(node, 0)); | 222 | + ES_ASSERT_GRAPH_SUCCESS(es::AddEdgeAndUpdatePeerDesc(*graph, *input1.GetProducer(), input1.GetProducerOutIndex(), |
| 223 | + node, kBinaryInputX2Idx)); | ||
| 224 | + return es::EsTensorHolder(c_builder->GetTensorHolderFromNode(node, kNodeOutputIdx)); | ||
| 205 | } | 225 | } |
| 206 | 226 | ||
| 207 | // Build a ReduceSum node used inside a pattern. axes is an internal Const node (CreateConst). | 227 | // Build a ReduceSum node used inside a pattern. axes is an internal Const node (CreateConst). |
| 208 | es::EsTensorHolder BuildPatternReduceSum(es::EsGraphBuilder& graph_builder, const es::EsTensorHolder& input) | 228 | es::EsTensorHolder BuildPatternReduceSum(es::EsGraphBuilder& graph_builder, const es::EsTensorHolder& input) |
| 209 | { | 229 | { |
| 210 | - auto axes = graph_builder.CreateConst(std::vector<int64_t>{-1}, std::vector<int64_t>{1}); | 230 | + auto axes = graph_builder.CreateConst(std::vector<int64_t>{kReduceLastAxis}, std::vector<int64_t>{kAxesShapeDim}); |
| 211 | auto* c_builder = graph_builder.GetCGraphBuilder(); | 231 | auto* c_builder = graph_builder.GetCGraphBuilder(); |
| 212 | auto* graph = c_builder->GetGraph(); | 232 | auto* graph = c_builder->GetGraph(); |
| 213 | 233 | ||
| @@ -235,20 +255,20 @@ es::EsTensorHolder BuildPatternReduceSum(es::EsGraphBuilder& graph_builder, cons | |||
| 235 | es::CreateFrom(true)}}) | 255 | es::CreateFrom(true)}}) |
| 236 | .Build(); | 256 | .Build(); |
| 237 | 257 | ||
| 238 | - es::AddEdgeAndUpdatePeerDesc(*graph, *input.GetProducer(), input.GetProducerOutIndex(), node, 0); | 258 | + ES_ASSERT_GRAPH_SUCCESS(es::AddEdgeAndUpdatePeerDesc(*graph, *input.GetProducer(), input.GetProducerOutIndex(), |
| 239 | - es::AddEdgeAndUpdatePeerDesc(*graph, *axes.GetProducer(), axes.GetProducerOutIndex(), node, 1); | 259 | + node, kReduceSumInputXIdx)); |
| 240 | - return es::EsTensorHolder(c_builder->GetTensorHolderFromNode(node, 0)); | 260 | + ES_ASSERT_GRAPH_SUCCESS(es::AddEdgeAndUpdatePeerDesc(*graph, *axes.GetProducer(), axes.GetProducerOutIndex(), node, |
| 261 | + kReduceSumAxesInputIdx)); | ||
| 262 | + return es::EsTensorHolder(c_builder->GetTensorHolderFromNode(node, kNodeOutputIdx)); | ||
| 241 | } | 263 | } |
| 242 | 264 | ||
| 243 | -// v1 pattern: | 265 | +// Pattern: output = x2 * x1 * (grad - ReduceSum(grad * x1)) |
| 244 | -// mul = Mul(input0, input1); sum = ReduceSum(mul); sub = Sub(input0, sum); | ||
| 245 | -// mul1 = Mul(input2, input1); mulGrad = Mul(mul1, sub) | ||
| 246 | PatternUniqPtr MakePatternSoftmaxGradExt(const std::string& pass_name) | 266 | PatternUniqPtr MakePatternSoftmaxGradExt(const std::string& pass_name) |
| 247 | { | 267 | { |
| 248 | auto graph_builder = es::EsGraphBuilder(pass_name.c_str()); | 268 | auto graph_builder = es::EsGraphBuilder(pass_name.c_str()); |
| 249 | - auto input0 = graph_builder.CreateInput(0, "grad"); | 269 | + auto input0 = graph_builder.CreateInput(kSubgraphInputGrad, "grad"); |
| 250 | - auto input1 = graph_builder.CreateInput(1, "x1"); | 270 | + auto input1 = graph_builder.CreateInput(kSubgraphInputX1, "x1"); |
| 251 | - auto input2 = graph_builder.CreateInput(2, "x2"); | 271 | + auto input2 = graph_builder.CreateInput(kSubgraphInputX2, "x2"); |
| 252 | 272 | ||
| 253 | auto mul = BuildBinaryNode(graph_builder, input0, input1, "Mul"); | 273 | auto mul = BuildBinaryNode(graph_builder, input0, input1, "Mul"); |
| 254 | auto sum = BuildPatternReduceSum(graph_builder, mul); | 274 | auto sum = BuildPatternReduceSum(graph_builder, mul); |
| @@ -258,7 +278,7 @@ PatternUniqPtr MakePatternSoftmaxGradExt(const std::string& pass_name) | |||
| 258 | 278 | ||
| 259 | auto graph = graph_builder.BuildAndReset({mul_grad}); | 279 | auto graph = graph_builder.BuildAndReset({mul_grad}); |
| 260 | auto pattern = std::make_unique<Pattern>(std::move(*graph)); | 280 | auto pattern = std::make_unique<Pattern>(std::move(*graph)); |
| 261 | - pattern->CaptureTensor({*sum.GetProducer(), 0}); | 281 | + pattern->CaptureTensor({*sum.GetProducer(), kNodeOutputIdx}); |
| 262 | return pattern; | 282 | return pattern; |
| 263 | } | 283 | } |
| 264 | 284 | ||
| @@ -271,9 +291,9 @@ PatternUniqPtr MakePatternSoftmaxGradExtV2(const std::string& pass_name, int32_t | |||
| 271 | { | 291 | { |
| 272 | std::string builder_name = pass_name + "_" + std::to_string(variant); | 292 | std::string builder_name = pass_name + "_" + std::to_string(variant); |
| 273 | auto graph_builder = es::EsGraphBuilder(builder_name.c_str()); | 293 | auto graph_builder = es::EsGraphBuilder(builder_name.c_str()); |
| 274 | - auto input0 = graph_builder.CreateInput(0, "grad"); | 294 | + auto input0 = graph_builder.CreateInput(kSubgraphInputGrad, "grad"); |
| 275 | - auto input1 = graph_builder.CreateInput(1, "x1"); | 295 | + auto input1 = graph_builder.CreateInput(kSubgraphInputX1, "x1"); |
| 276 | - auto input2 = graph_builder.CreateInput(2, "x2"); | 296 | + auto input2 = graph_builder.CreateInput(kSubgraphInputX2, "x2"); |
| 277 | 297 | ||
| 278 | auto mul = BuildBinaryNode(graph_builder, input0, input1, "Mul"); | 298 | auto mul = BuildBinaryNode(graph_builder, input0, input1, "Mul"); |
| 279 | auto sum = BuildPatternReduceSum(graph_builder, mul); | 299 | auto sum = BuildPatternReduceSum(graph_builder, mul); |
| @@ -302,7 +322,7 @@ PatternUniqPtr MakePatternSoftmaxGradExtV2(const std::string& pass_name, int32_t | |||
| 302 | 322 | ||
| 303 | auto graph = graph_builder.BuildAndReset({mul_grad}); | 323 | auto graph = graph_builder.BuildAndReset({mul_grad}); |
| 304 | auto pattern = std::make_unique<Pattern>(std::move(*graph)); | 324 | auto pattern = std::make_unique<Pattern>(std::move(*graph)); |
| 305 | - pattern->CaptureTensor({*sum.GetProducer(), 0}); | 325 | + pattern->CaptureTensor({*sum.GetProducer(), kNodeOutputIdx}); |
| 306 | return pattern; | 326 | return pattern; |
| 307 | } | 327 | } |
| 308 | 328 | ||
| @@ -322,12 +342,13 @@ GraphUniqPtr SoftmaxGradExtReplacementCommon(const std::unique_ptr<MatchResult>& | |||
| 322 | 342 | ||
| 323 | std::vector<SubgraphInput> subgraph_inputs; | 343 | std::vector<SubgraphInput> subgraph_inputs; |
| 324 | match_result->ToSubgraphBoundary()->GetAllInputs(subgraph_inputs); | 344 | match_result->ToSubgraphBoundary()->GetAllInputs(subgraph_inputs); |
| 325 | - OP_LOGE_IF(subgraph_inputs.size() < 3UL, nullptr, pass_name.c_str(), "Subgraph inputs size %zu is less than 3.", | 345 | + OP_LOGE_IF(subgraph_inputs.size() < kMinSubgraphInputCount, nullptr, pass_name.c_str(), |
| 326 | - subgraph_inputs.size()); | 346 | + "Subgraph inputs size %zu is less than %zu.", subgraph_inputs.size(), kMinSubgraphInputCount); |
| 327 | 347 | ||
| 328 | auto graph_builder = es::EsGraphBuilder("replacement"); | 348 | auto graph_builder = es::EsGraphBuilder("replacement"); |
| 329 | auto replacement_inputs = CreateReplacementInputs(graph_builder, subgraph_inputs); | 349 | auto replacement_inputs = CreateReplacementInputs(graph_builder, subgraph_inputs); |
| 330 | - OP_LOGE_IF(replacement_inputs.size() < 3UL, nullptr, pass_name.c_str(), "Create replacement inputs failed."); | 350 | + OP_LOGE_IF(replacement_inputs.size() < kMinSubgraphInputCount, nullptr, pass_name.c_str(), |
| 351 | + "Create replacement inputs failed."); | ||
| 331 | 352 | ||
| 332 | // SoftmaxGradExt(grad, x1, x2): grad=input0, x1=input1, x2=input2. | 353 | // SoftmaxGradExt(grad, x1, x2): grad=input0, x1=input1, x2=input2. |
| 333 | auto softmax_grad_ext = es::SoftmaxGradExt(replacement_inputs[kSubgraphInputGrad], | 354 | auto softmax_grad_ext = es::SoftmaxGradExt(replacement_inputs[kSubgraphInputGrad], |
| @@ -376,7 +397,7 @@ std::vector<PatternUniqPtr> SoftmaxGradExtV2FusionPass::Patterns() | |||
| 376 | { | 397 | { |
| 377 | OPS_LOG_D(kPassNameV2.c_str(), "Enter Patterns for SoftmaxGradExtV2FusionPass."); | 398 | OPS_LOG_D(kPassNameV2.c_str(), "Enter Patterns for SoftmaxGradExtV2FusionPass."); |
| 378 | std::vector<PatternUniqPtr> patterns; | 399 | std::vector<PatternUniqPtr> patterns; |
| 379 | - for (int32_t i = 0; i < 4; ++i) { | 400 | + for (int32_t i = 0; i < kPatternV2VariantCount; ++i) { |
| 380 | patterns.emplace_back(MakePatternSoftmaxGradExtV2(kPassNameV2, i)); | 401 | patterns.emplace_back(MakePatternSoftmaxGradExtV2(kPassNameV2, i)); |
| 381 | } | 402 | } |
| 382 | return patterns; | 403 | return patterns; |
| @@ -594,36 +594,16 @@ activation-c@ops-nn: | |||
| 594 | test_code: | 594 | test_code: |
| 595 | - ops/ops-nn/activation/celu_v2/tests/ | 595 | - ops/ops-nn/activation/celu_v2/tests/ |
| 596 | - ops/ops-nn/activation/celu_v2/examples/ | 596 | - ops/ops-nn/activation/celu_v2/examples/ |
| 597 | - - ops/ops-nn/activation/elu/tests/ | ||
| 598 | - - ops/ops-nn/activation/elu/examples/ | ||
| 599 | - - ops/ops-nn/activation/elu_grad_v2/tests/ | ||
| 600 | - - ops/ops-nn/activation/elu_grad_v2/examples/ | ||
| 601 | - ops/ops-nn/activation/erfinv/tests/ | 597 | - ops/ops-nn/activation/erfinv/tests/ |
| 602 | - ops/ops-nn/activation/erfinv/examples/ | 598 | - ops/ops-nn/activation/erfinv/examples/ |
| 603 | - - ops/ops-nn/activation/fast_gelu/examples/ | ||
| 604 | - - ops/ops-nn/activation/fast_gelu_grad/examples/ | ||
| 605 | - ops/ops-nn/activation/fatrelu_mul/tests/ | 599 | - ops/ops-nn/activation/fatrelu_mul/tests/ |
| 606 | - ops/ops-nn/activation/fatrelu_mul/examples/ | 600 | - ops/ops-nn/activation/fatrelu_mul/examples/ |
| 607 | - ops/ops-nn/activation/clipped_swiglu/tests/ | 601 | - ops/ops-nn/activation/clipped_swiglu/tests/ |
| 608 | - ops/ops-nn/activation/clipped_swiglu/examples/ | 602 | - ops/ops-nn/activation/clipped_swiglu/examples/ |
| 609 | - ops/ops-nn/activation/clipped_swiglu_grad/tests/ | 603 | - ops/ops-nn/activation/clipped_swiglu_grad/tests/ |
| 610 | - ops/ops-nn/activation/clipped_swiglu_grad/examples/ | 604 | - ops/ops-nn/activation/clipped_swiglu_grad/examples/ |
| 611 | - - ops/ops-nn/activation/ge_glu_grad_v2/tests/ | ||
| 612 | - - ops/ops-nn/activation/ge_glu_grad_v2/examples/ | ||
| 613 | - - ops/ops-nn/activation/ge_glu_v2/tests/ | ||
| 614 | - - ops/ops-nn/activation/ge_glu_v2/examples/ | ||
| 615 | - - ops/ops-nn/activation/gelu/tests/ | ||
| 616 | - - ops/ops-nn/activation/gelu/examples/ | ||
| 617 | - - ops/ops-nn/activation/gelu_grad/tests/ | ||
| 618 | - - ops/ops-nn/activation/gelu_grad/examples/ | ||
| 619 | - - ops/ops-nn/activation/gelu_grad_v2/tests/ | ||
| 620 | - - ops/ops-nn/activation/gelu_grad_v2/examples/ | ||
| 621 | - ops/ops-nn/activation/gelu_mul/tests/ | 605 | - ops/ops-nn/activation/gelu_mul/tests/ |
| 622 | - ops/ops-nn/activation/gelu_mul/examples/ | 606 | - ops/ops-nn/activation/gelu_mul/examples/ |
| 623 | - - ops/ops-nn/activation/gelu_quant/tests/ | ||
| 624 | - - ops/ops-nn/activation/gelu_quant/examples/ | ||
| 625 | - - ops/ops-nn/activation/gelu_v2/tests/ | ||
| 626 | - - ops/ops-nn/activation/gelu_v2/examples/ | ||
| 627 | - ops/ops-nn/activation/glu/examples/ | 607 | - ops/ops-nn/activation/glu/examples/ |
| 628 | - ops/ops-nn/activation/glu/tests/ | 608 | - ops/ops-nn/activation/glu/tests/ |
| 629 | - ops/ops-nn/activation/hard_shrink/tests/ | 609 | - ops/ops-nn/activation/hard_shrink/tests/ |
| @@ -640,14 +620,8 @@ activation-c@ops-nn: | |||
| 640 | - ops/ops-nn/activation/hard_swish_grad/examples/ | 620 | - ops/ops-nn/activation/hard_swish_grad/examples/ |
| 641 | - ops/ops-nn/activation/hard_swish_grad_v2/tests/ | 621 | - ops/ops-nn/activation/hard_swish_grad_v2/tests/ |
| 642 | - ops/ops-nn/activation/hard_swish_grad_v2/examples/ | 622 | - ops/ops-nn/activation/hard_swish_grad_v2/examples/ |
| 643 | - - ops/ops-nn/activation/hardtanh_grad/tests/ | ||
| 644 | - - ops/ops-nn/activation/hardtanh_grad/examples/ | ||
| 645 | - ops/ops-nn/activation/heaviside/tests/ | 623 | - ops/ops-nn/activation/heaviside/tests/ |
| 646 | - ops/ops-nn/activation/heaviside/examples/ | 624 | - ops/ops-nn/activation/heaviside/examples/ |
| 647 | - - ops/ops-nn/activation/leaky_relu/tests/ | ||
| 648 | - - ops/ops-nn/activation/leaky_relu/examples/ | ||
| 649 | - - ops/ops-nn/activation/leaky_relu_grad/tests/ | ||
| 650 | - - ops/ops-nn/activation/leaky_relu_grad/examples/ | ||
| 651 | - ops/ops-nn/activation/log_sigmoid/tests/ | 625 | - ops/ops-nn/activation/log_sigmoid/tests/ |
| 652 | - ops/ops-nn/activation/log_sigmoid/examples/ | 626 | - ops/ops-nn/activation/log_sigmoid/examples/ |
| 653 | - ops/ops-nn/activation/logsigmoid_grad/tests/ | 627 | - ops/ops-nn/activation/logsigmoid_grad/tests/ |
| @@ -660,14 +634,8 @@ activation-c@ops-nn: | |||
| 660 | - ops/ops-nn/activation/mish/examples/ | 634 | - ops/ops-nn/activation/mish/examples/ |
| 661 | - ops/ops-nn/activation/mish_grad/tests/ | 635 | - ops/ops-nn/activation/mish_grad/tests/ |
| 662 | - ops/ops-nn/activation/mish_grad/examples/ | 636 | - ops/ops-nn/activation/mish_grad/examples/ |
| 663 | - - ops/ops-nn/activation/p_relu/tests/ | ||
| 664 | - - ops/ops-nn/activation/p_relu/examples/ | ||
| 665 | - ops/ops-nn/activation/prelu_grad_update/tests/ | 637 | - ops/ops-nn/activation/prelu_grad_update/tests/ |
| 666 | - ops/ops-nn/activation/prelu_grad_update/examples/ | 638 | - ops/ops-nn/activation/prelu_grad_update/examples/ |
| 667 | - - ops/ops-nn/activation/relu/tests/ | ||
| 668 | - - ops/ops-nn/activation/relu/examples/ | ||
| 669 | - - ops/ops-nn/activation/relu_grad/tests/ | ||
| 670 | - - ops/ops-nn/activation/relu_grad/examples/ | ||
| 671 | - ops/ops-nn/activation/relu_grad_v2/tests/ | 639 | - ops/ops-nn/activation/relu_grad_v2/tests/ |
| 672 | - ops/ops-nn/activation/relu_grad_v2/examples/ | 640 | - ops/ops-nn/activation/relu_grad_v2/examples/ |
| 673 | - ops/ops-nn/activation/selu/tests/ | 641 | - ops/ops-nn/activation/selu/tests/ |
| @@ -676,12 +644,6 @@ activation-c@ops-nn: | |||
| 676 | - ops/ops-nn/activation/selu_grad/examples/ | 644 | - ops/ops-nn/activation/selu_grad/examples/ |
| 677 | - ops/ops-nn/activation/shrink/tests/ | 645 | - ops/ops-nn/activation/shrink/tests/ |
| 678 | - ops/ops-nn/activation/shrink/examples/ | 646 | - ops/ops-nn/activation/shrink/examples/ |
| 679 | - - ops/ops-nn/activation/sigmoid/tests/ | ||
| 680 | - - ops/ops-nn/activation/sigmoid/examples/ | ||
| 681 | - - ops/ops-nn/activation/sigmoid_grad/tests/ | ||
| 682 | - - ops/ops-nn/activation/sigmoid_grad/examples/ | ||
| 683 | - - ops/ops-nn/activation/silu_grad/tests/ | ||
| 684 | - - ops/ops-nn/activation/silu_grad/examples/ | ||
| 685 | - ops/ops-nn/activation/situ_glu/tests/ | 647 | - ops/ops-nn/activation/situ_glu/tests/ |
| 686 | - ops/ops-nn/activation/situ_glu/examples/ | 648 | - ops/ops-nn/activation/situ_glu/examples/ |
| 687 | - ops/ops-nn/activation/situ_glu_grad/tests/ | 649 | - ops/ops-nn/activation/situ_glu_grad/tests/ |
| @@ -704,12 +666,6 @@ activation-c@ops-nn: | |||
| 704 | - ops/ops-nn/activation/squared_relu/examples/ | 666 | - ops/ops-nn/activation/squared_relu/examples/ |
| 705 | - ops/ops-nn/activation/swi_glu/tests/ | 667 | - ops/ops-nn/activation/swi_glu/tests/ |
| 706 | - ops/ops-nn/activation/swi_glu/examples/ | 668 | - ops/ops-nn/activation/swi_glu/examples/ |
| 707 | - - ops/ops-nn/activation/swi_glu_grad/tests/ | ||
| 708 | - - ops/ops-nn/activation/swi_glu_grad/examples/ | ||
| 709 | - - ops/ops-nn/activation/swish/tests/ | ||
| 710 | - - ops/ops-nn/activation/swish/examples/ | ||
| 711 | - - ops/ops-nn/activation/swish_grad/tests/ | ||
| 712 | - - ops/ops-nn/activation/swish_grad/examples/ | ||
| 713 | - ops/ops-nn/activation/swiglu_group_quant/tests/ | 669 | - ops/ops-nn/activation/swiglu_group_quant/tests/ |
| 714 | - ops/ops-nn/activation/swiglu_group_quant/examples/ | 670 | - ops/ops-nn/activation/swiglu_group_quant/examples/ |
| 715 | - ops/ops-nn/activation/threshold/tests/ | 671 | - ops/ops-nn/activation/threshold/tests/ |
| @@ -2115,55 +2071,56 @@ VC1@ops-nn: | |||
| 2115 | kernel_style: null | 2071 | kernel_style: null |
| 2116 | unrelease: | 2072 | unrelease: |
| 2117 | test_code: | 2073 | test_code: |
| 2118 | - #- ops/ops-nn/activation/elu/examples/ | 2074 | + - ops/ops-nn/activation/elu/examples/ |
| 2119 | - #- ops/ops-nn/activation/elu/tests/ | 2075 | + - ops/ops-nn/activation/elu/tests/ |
| 2120 | - ops/ops-nn/activation/elu_grad/examples/ | 2076 | - ops/ops-nn/activation/elu_grad/examples/ |
| 2121 | - ops/ops-nn/activation/elu_grad/tests/ | 2077 | - ops/ops-nn/activation/elu_grad/tests/ |
| 2122 | - #- ops/ops-nn/activation/elu_grad_v2/examples/ | 2078 | + - ops/ops-nn/activation/elu_grad_v2/examples/ |
| 2123 | - #- ops/ops-nn/activation/elu_grad_v2/tests/ | 2079 | + - ops/ops-nn/activation/elu_grad_v2/tests/ |
| 2124 | - #- ops/ops-nn/activation/fast_gelu/examples/ | 2080 | + - ops/ops-nn/activation/fast_gelu/examples/ |
| 2125 | - #- ops/ops-nn/activation/fast_gelu/tests/ | 2081 | + - ops/ops-nn/activation/fast_gelu/tests/ |
| 2126 | - #- ops/ops-nn/activation/fast_gelu_grad/examples/ | 2082 | + - ops/ops-nn/activation/fast_gelu_grad/examples/ |
| 2127 | - ops/ops-nn/activation/fast_gelu_grad/tests/ | 2083 | - ops/ops-nn/activation/fast_gelu_grad/tests/ |
| 2128 | - #- ops/ops-nn/activation/ge_glu_grad_v2/examples/ | 2084 | + - ops/ops-nn/activation/ge_glu_grad_v2/examples/ |
| 2129 | - #- ops/ops-nn/activation/ge_glu_grad_v2/tests/ | 2085 | + - ops/ops-nn/activation/ge_glu_grad_v2/tests/ |
| 2130 | - #- ops/ops-nn/activation/ge_glu_v2/examples/ | 2086 | + - ops/ops-nn/activation/ge_glu_v2/examples/ |
| 2131 | - #- ops/ops-nn/activation/ge_glu_v2/tests/ | 2087 | + - ops/ops-nn/activation/ge_glu_v2/tests/ |
| 2132 | - #- ops/ops-nn/activation/gelu/examples/ | 2088 | + - ops/ops-nn/activation/gelu/examples/ |
| 2133 | - #- ops/ops-nn/activation/gelu/tests/ | 2089 | + - ops/ops-nn/activation/gelu/tests/ |
| 2134 | - #- ops/ops-nn/activation/gelu_grad/examples/ | 2090 | + - ops/ops-nn/activation/gelu_grad/examples/ |
| 2135 | - #- ops/ops-nn/activation/gelu_grad/tests/ | 2091 | + - ops/ops-nn/activation/gelu_grad/tests/ |
| 2136 | - #- ops/ops-nn/activation/gelu_grad_v2/examples/ | 2092 | + - ops/ops-nn/activation/gelu_grad_v2/examples/ |
| 2137 | - #- ops/ops-nn/activation/gelu_grad_v2/tests/ | 2093 | + - ops/ops-nn/activation/gelu_grad_v2/tests/ |
| 2138 | - #- ops/ops-nn/activation/gelu_quant/examples/ | 2094 | + - ops/ops-nn/activation/gelu_quant/examples/ |
| 2139 | - #- ops/ops-nn/activation/gelu_quant/tests/ | 2095 | + - ops/ops-nn/activation/gelu_quant/tests/ |
| 2140 | - #- ops/ops-nn/activation/gelu_v2/examples/ | 2096 | + - ops/ops-nn/activation/gelu_v2/examples/ |
| 2141 | - #- ops/ops-nn/activation/gelu_v2/tests/ | 2097 | + - ops/ops-nn/activation/gelu_v2/tests/ |
| 2142 | - #- ops/ops-nn/activation/hardtanh_grad/examples/ | 2098 | + - ops/ops-nn/activation/hardtanh_grad/examples/ |
| 2143 | - #- ops/ops-nn/activation/hardtanh_grad/tests/ | 2099 | + - ops/ops-nn/activation/hardtanh_grad/tests/ |
| 2144 | - #- ops/ops-nn/activation/leaky_relu/examples/ | 2100 | + - ops/ops-nn/activation/leaky_relu/examples/ |
| 2145 | - #- ops/ops-nn/activation/leaky_relu/tests/ | 2101 | + - ops/ops-nn/activation/leaky_relu/tests/ |
| 2146 | - #- ops/ops-nn/activation/leaky_relu_grad/examples/ | 2102 | + - ops/ops-nn/activation/leaky_relu_grad/examples/ |
| 2147 | - #- ops/ops-nn/activation/leaky_relu_grad/tests/ | 2103 | + - ops/ops-nn/activation/leaky_relu_grad/tests/ |
| 2148 | - #- ops/ops-nn/activation/prelu/examples/ | 2104 | + - ops/ops-nn/activation/p_relu/examples/ |
| 2149 | - #- ops/ops-nn/activation/prelu/tests/ | 2105 | + - ops/ops-nn/activation/p_relu/tests/ |
| 2150 | - #- ops/ops-nn/activation/relu/examples/ | 2106 | + - ops/ops-nn/activation/relu/examples/ |
| 2151 | - #- ops/ops-nn/activation/relu/tests/ | 2107 | + - ops/ops-nn/activation/relu/tests/ |
| 2108 | + - ops/ops-nn/activation/relu_grad/examples/ | ||
| 2109 | + - ops/ops-nn/activation/relu_grad/tests/ | ||
| 2152 | - ops/ops-nn/activation/relu_v2/examples/ | 2110 | - ops/ops-nn/activation/relu_v2/examples/ |
| 2153 | - ops/ops-nn/activation/relu_v2/tests/ | 2111 | - ops/ops-nn/activation/relu_v2/tests/ |
| 2154 | - #- ops/ops-nn/activation/sigmoid/examples/ | 2112 | + - ops/ops-nn/activation/sigmoid/examples/ |
| 2155 | - #- ops/ops-nn/activation/sigmoid/tests/ | 2113 | + - ops/ops-nn/activation/sigmoid/tests/ |
| 2156 | - #- ops/ops-nn/activation/sigmoid_grad/examples/ | 2114 | + - ops/ops-nn/activation/sigmoid_grad/examples/ |
| 2157 | - #- ops/ops-nn/activation/sigmoid_grad/tests/ | 2115 | + - ops/ops-nn/activation/sigmoid_grad/tests/ |
| 2158 | - #- ops/ops-nn/activation/silu_grad/examples/ | 2116 | + - ops/ops-nn/activation/silu_grad/examples/ |
| 2159 | - #- ops/ops-nn/activation/silu_grad/tests/ | 2117 | + - ops/ops-nn/activation/silu_grad/tests/ |
| 2160 | - #- ops/ops-nn/activation/swi_glu_grad/examples/ | 2118 | + - ops/ops-nn/activation/swi_glu_grad/examples/ |
| 2161 | - #- ops/ops-nn/activation/swi_glu_grad/tests/ | 2119 | + - ops/ops-nn/activation/swi_glu_grad/tests/ |
| 2162 | - #- ops/ops-nn/activation/swish/examples/ | 2120 | + - ops/ops-nn/activation/swish/examples/ |
| 2163 | - #- ops/ops-nn/activation/swish/tests/ | 2121 | + - ops/ops-nn/activation/swish/tests/ |
| 2164 | - #- ops/ops-nn/activation/swish_grad/examples/ | 2122 | + - ops/ops-nn/activation/swish_grad/examples/ |
| 2165 | - #- ops/ops-nn/activation/swish_grad/tests/ | 2123 | + - ops/ops-nn/activation/swish_grad/tests/ |
| 2166 | - - ops/ops-nn/quant/ascend_quant/examples/ | ||
| 2167 | - ops/ops-nn/quant/ascend_quant/tests/ | 2124 | - ops/ops-nn/quant/ascend_quant/tests/ |
| 2168 | - ops/ops-nn/quant/ascend_quant_v2/examples/ | 2125 | - ops/ops-nn/quant/ascend_quant_v2/examples/ |
| 2169 | - ops/ops-nn/quant/ascend_quant_v2/tests/ | 2126 | - ops/ops-nn/quant/ascend_quant_v2/tests/ |
| @@ -670,7 +670,10 @@ ge::graphStatus Tiling4DynamicBlockQuant(gert::TilingContext* context) | |||
| 670 | return ge::GRAPH_SUCCESS; | 670 | return ge::GRAPH_SUCCESS; |
| 671 | } | 671 | } |
| 672 | 672 | ||
| 673 | -ge::graphStatus TilingPrepare4DynamicBlockQuant(gert::TilingParseContext* context) { return ge::GRAPH_SUCCESS; } | 673 | +ge::graphStatus TilingPrepare4DynamicBlockQuant([[maybe_unused]] gert::TilingParseContext* context) |
| 674 | +{ | ||
| 675 | + return ge::GRAPH_SUCCESS; | ||
| 676 | +} | ||
| 674 | 677 | ||
| 675 | // register tiling interface of the DynamicBlockQuant op. | 678 | // register tiling interface of the DynamicBlockQuant op. |
| 676 | IMPL_OP_OPTILING(DynamicBlockQuant) | 679 | IMPL_OP_OPTILING(DynamicBlockQuant) |
| @@ -754,7 +754,10 @@ ge::graphStatus Tiling4DynamicMxQuant(gert::TilingContext* context) | |||
| 754 | return ge::GRAPH_SUCCESS; | 754 | return ge::GRAPH_SUCCESS; |
| 755 | } | 755 | } |
| 756 | 756 | ||
| 757 | -ge::graphStatus TilingPrepare4DynamicMxQuant(gert::TilingParseContext* context) { return ge::GRAPH_SUCCESS; } | 757 | +ge::graphStatus TilingPrepare4DynamicMxQuant([[maybe_unused]] gert::TilingParseContext* context) |
| 758 | +{ | ||
| 759 | + return ge::GRAPH_SUCCESS; | ||
| 760 | +} | ||
| 758 | 761 | ||
| 759 | // register tiling interface of the DynamicMxQuant op. | 762 | // register tiling interface of the DynamicMxQuant op. |
| 760 | IMPL_OP_OPTILING(DynamicMxQuant) | 763 | IMPL_OP_OPTILING(DynamicMxQuant) |