已合并
fix:重构runtime2_util.h #8841
FishPotatoChen创建于 22 天前
fix:重构runtime2_util.h #8841
已合并
FishPotatoChen创建于 22 天前
30 个文件变更+66-66
@@ -19,7 +19,7 @@
19#include "log/log.h"19#include "log/log.h"
20#include "error_util.h"20#include "error_util.h"
21#include "util/math_util.h"21#include "util/math_util.h"
22-#include "op_api/runtime2_util.h"22+#include "op_api/runtime2_util_nn.h"
23#include "register/tilingdata_base.h"23#include "register/tilingdata_base.h"
24#include "register/op_impl_registry.h"24#include "register/op_impl_registry.h"
25#include "platform/platform_infos_def.h"25#include "platform/platform_infos_def.h"
@@ -49,4 +49,4 @@ protected:
49 49 
50} // namespace optiling50} // namespace optiling
51 51 
52-#endif // NORM_CONFUSION_SOFTMAX_GRAD_TILING_H_52+#endif // NORM_CONFUSION_SOFTMAX_GRAD_TILING_H_
@@ -16,7 +16,7 @@
16#ifndef SOFTMAX_GRAD_EXT_TILING_BASE_H_16#ifndef SOFTMAX_GRAD_EXT_TILING_BASE_H_
17#define SOFTMAX_GRAD_EXT_TILING_BASE_H_17#define SOFTMAX_GRAD_EXT_TILING_BASE_H_
18#include <cmath>18#include <cmath>
19-#include "op_api/runtime2_util.h"19+#include "op_api/runtime2_util_nn.h"
20#include "register/tilingdata_base.h"20#include "register/tilingdata_base.h"
21#include "tiling/tiling_api.h"21#include "tiling/tiling_api.h"
22#include "op_host/tiling_base.h"22#include "op_host/tiling_base.h"
@@ -282,4 +282,4 @@ extern ge::graphStatus TilingPrepareForSoftmaxGradExt(gert::TilingParseContext*
282 282 
283} // namespace optiling283} // namespace optiling
284 284 
285-#endif // SOFTMAX_GRAD_EXT_TILING_BASE_H_285+#endif // SOFTMAX_GRAD_EXT_TILING_BASE_H_
Rcommon/inc/op_api/runtime2_util.hcommon/inc/op_api/runtime2_util_nn.h+5-5
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -9,11 +9,11 @@
9 */9 */
10 10 
11/*!11/*!
12- * \file runtime2_util.h12+ * \file runtime2_util_nn.h
13 * \brief runtime2 util13 * \brief runtime2 util
14 */14 */
15-#ifndef CANN_OPS_BUILT_IN_OP_TILING_RUNTIME2_UTIL_H_15+#ifndef CANN_OPS_BUILT_IN_OP_TILING_RUNTIME2_UTIL_NN_H_
16-#define CANN_OPS_BUILT_IN_OP_TILING_RUNTIME2_UTIL_H_16+#define CANN_OPS_BUILT_IN_OP_TILING_RUNTIME2_UTIL_NN_H_
17 17 
18#include "register/op_impl_registry.h"18#include "register/op_impl_registry.h"
19#include "op_api/op_util.h"19#include "op_api/op_util.h"
@@ -120,4 +120,4 @@ private:
120 T content;120 T content;
121};121};
122} // namespace optiling122} // namespace optiling
123-#endif // CANN_OPS_BUILT_IN_OP_TILING_RUNTIME2_UTIL_H_123+#endif // CANN_OPS_BUILT_IN_OP_TILING_RUNTIME2_UTIL_NN_H_
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -13,7 +13,7 @@
13 13 
14#include <memory>14#include <memory>
15#include <vector>15#include <vector>
16-#include "op_api/runtime2_util.h"16+#include "op_api/runtime2_util_nn.h"
17 17 
18namespace optiling {18namespace optiling {
19class CacheTilingContext {19class CacheTilingContext {
@@ -39,7 +39,7 @@ private:
39template <typename T>39template <typename T>
40class GenericHashItem {40class GenericHashItem {
41public:41public:
42- GenericHashItem(){};42+ GenericHashItem() {};
43 GenericHashItem(const GenericHashItem& obj)43 GenericHashItem(const GenericHashItem& obj)
44 {44 {
45 cacheTilingContext = obj.cacheTilingContext;45 cacheTilingContext = obj.cacheTilingContext;
@@ -14,7 +14,7 @@
14 */14 */
15#include "log/log.h"15#include "log/log.h"
16#include "register/op_impl_registry.h"16#include "register/op_impl_registry.h"
17-#include "op_api/runtime2_util.h"17+#include "op_api/runtime2_util_nn.h"
18 18 
19using namespace ge;19using namespace ge;
20namespace ops {20namespace ops {
@@ -27,7 +27,7 @@
27#include "matmul/common/op_host/op_tiling/debug_tiling.h"27#include "matmul/common/op_host/op_tiling/debug_tiling.h"
28#include "error_util.h"28#include "error_util.h"
29#include "op_common/op_host/util/platform_util.h"29#include "op_common/op_host/util/platform_util.h"
30-#include "op_api/runtime2_util.h"30+#include "op_api/runtime2_util_nn.h"
31 31 
32namespace optiling {32namespace optiling {
33using Ops::NN::Optiling::TilingBaseClass;33using Ops::NN::Optiling::TilingBaseClass;
@@ -117,4 +117,4 @@ private:
117 int32_t vRegSize_ = 256;117 int32_t vRegSize_ = 256;
118};118};
119} // namespace optiling119} // namespace optiling
120-#endif // AIR_CXX_RUNTIME_V2_OP_IMPL_EMBEDDING_H120+#endif // AIR_CXX_RUNTIME_V2_OP_IMPL_EMBEDDING_H
@@ -13,7 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#include "op_api/runtime2_util.h"16+#include "op_api/runtime2_util_nn.h"
17#include "op_api/op_util.h"17#include "op_api/op_util.h"
18#include "log/log.h"18#include "log/log.h"
19#include "op_common/log/log.h"19#include "op_common/log/log.h"
@@ -185,4 +185,4 @@ ge::graphStatus Tiling4IndexFillArch35(gert::TilingContext* context)
185 return Ops::NN::Optiling::TilingRegistry::GetInstance().DoTilingImpl(context);185 return Ops::NN::Optiling::TilingRegistry::GetInstance().DoTilingImpl(context);
186}186}
187 187 
188-} // namespace optiling188+} // namespace optiling
@@ -16,7 +16,7 @@
16#include "op_common/op_host/util/platform_util.h"16#include "op_common/op_host/util/platform_util.h"
17#include "error_util.h"17#include "error_util.h"
18#include "log/log.h"18#include "log/log.h"
19-#include "op_api/runtime2_util.h"19+#include "op_api/runtime2_util_nn.h"
20#include "op_host/util/math_util.h"20#include "op_host/util/math_util.h"
21#include "op_host/tiling_templates_registry.h"21#include "op_host/tiling_templates_registry.h"
22#include "index_fill_tiling_simd.h"22#include "index_fill_tiling_simd.h"
@@ -13,7 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#include "op_api/runtime2_util.h"16+#include "op_api/runtime2_util_nn.h"
17#include "op_common/op_host/util/platform_util.h"17#include "op_common/op_host/util/platform_util.h"
18#include "op_host/util/math_util.h"18#include "op_host/util/math_util.h"
19#include "op_api/op_util.h"19#include "op_api/op_util.h"
@@ -13,7 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15 15 
16-#include "op_api/runtime2_util.h"16+#include "op_api/runtime2_util_nn.h"
17#include "op_common/op_host/util/platform_util.h"17#include "op_common/op_host/util/platform_util.h"
18#include "op_host/util/math_util.h"18#include "op_host/util/math_util.h"
19#include "tiling/tiling_api.h"19#include "tiling/tiling_api.h"
@@ -17,7 +17,7 @@
17#include "log/log.h"17#include "log/log.h"
18#include "register/tilingdata_base.h"18#include "register/tilingdata_base.h"
19#include "../../../../matmul/common/op_host/op_tiling/tiling_cache.h"19#include "../../../../matmul/common/op_host/op_tiling/tiling_cache.h"
20-#include "op_api/runtime2_util.h"20+#include "op_api/runtime2_util_nn.h"
21#include "../../../../matmul/common/op_host/op_tiling/hash.h"21#include "../../../../matmul/common/op_host/op_tiling/hash.h"
22 22 
23namespace optiling {23namespace optiling {
@@ -66,4 +66,4 @@ ge::graphStatus TilingPrepareRepeatInterleaveForAscendC(gert::TilingParseContext
66IMPL_OP_OPTILING(RepeatInterleave)66IMPL_OP_OPTILING(RepeatInterleave)
67 .Tiling(RepeatInterleaveTilingForAscendC)67 .Tiling(RepeatInterleaveTilingForAscendC)
68 .TilingParse<RepeatInterleaveCompileInfo>(TilingPrepareRepeatInterleaveForAscendC);68 .TilingParse<RepeatInterleaveCompileInfo>(TilingPrepareRepeatInterleaveForAscendC);
69-} // namespace optiling69+} // namespace optiling
@@ -18,7 +18,7 @@
18 18 
19#include <cstdint>19#include <cstdint>
20#include <vector>20#include <vector>
21-#include "op_api/runtime2_util.h"21+#include "op_api/runtime2_util_nn.h"
22#include "register/tilingdata_base.h"22#include "register/tilingdata_base.h"
23#include "tiling/tiling_api.h"23#include "tiling/tiling_api.h"
24#include "op_host/tiling_base.h"24#include "op_host/tiling_base.h"
@@ -107,4 +107,4 @@ protected:
107 bool UseSIMT();107 bool UseSIMT();
108};108};
109} // namespace optiling109} // namespace optiling
110-#endif // OP_NN_INDEX_SPARSE_SLICE_OP_HOST_ARCH35_TILING_H110+#endif // OP_NN_INDEX_SPARSE_SLICE_OP_HOST_ARCH35_TILING_H
@@ -27,7 +27,7 @@
27#include "../../op_kernel/arch35/sigmoid_cross_entropy_with_logits_grad_v2_dag.h"27#include "../../op_kernel/arch35/sigmoid_cross_entropy_with_logits_grad_v2_dag.h"
28#include "../../op_kernel/arch35/sigmoid_cross_entropy_with_logits_grad_v2_struct.h"28#include "../../op_kernel/arch35/sigmoid_cross_entropy_with_logits_grad_v2_struct.h"
29#include "register/op_def_registry.h"29#include "register/op_def_registry.h"
30-#include "op_api/runtime2_util.h"30+#include "op_api/runtime2_util_nn.h"
31 31 
32namespace optiling {32namespace optiling {
33using Ops::NN::Optiling::TilingBaseClass;33using Ops::NN::Optiling::TilingBaseClass;
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -17,7 +17,7 @@
17#include "tiling/platform/platform_ascendc.h"17#include "tiling/platform/platform_ascendc.h"
18#include "log/log.h"18#include "log/log.h"
19#include "register/op_impl_registry.h"19#include "register/op_impl_registry.h"
20-#include "op_api/runtime2_util.h"20+#include "op_api/runtime2_util_nn.h"
21#include "op_api/op_util.h"21#include "op_api/op_util.h"
22#include "op_host/tiling_templates_registry.h"22#include "op_host/tiling_templates_registry.h"
23 23 
@@ -217,4 +217,4 @@ ge::graphStatus TilingParse4SigmoidCrossEntropyWithLogitsV2(gert::TilingParseCon
217IMPL_OP_OPTILING(SigmoidCrossEntropyWithLogitsV2)217IMPL_OP_OPTILING(SigmoidCrossEntropyWithLogitsV2)
218 .Tiling(Tiling4SigmoidCrossEntropyWithLogitsV2)218 .Tiling(Tiling4SigmoidCrossEntropyWithLogitsV2)
219 .TilingParse<SigmoidCEWithLogitsV2CompileInfo>(TilingParse4SigmoidCrossEntropyWithLogitsV2);219 .TilingParse<SigmoidCEWithLogitsV2CompileInfo>(TilingParse4SigmoidCrossEntropyWithLogitsV2);
220-} // namespace optiling220+} // namespace optiling
@@ -14,7 +14,7 @@
14 */14 */
15 15 
16#include "op_host/tiling_util.h"16#include "op_host/tiling_util.h"
17-#include "op_api/runtime2_util.h"17+#include "op_api/runtime2_util_nn.h"
18#include "add_rms_norm_dynamic_quant_v2_tiling_arch35.h"18#include "add_rms_norm_dynamic_quant_v2_tiling_arch35.h"
19 19 
20namespace optiling {20namespace optiling {
@@ -25,7 +25,7 @@
25#include "platform/platform_infos_def.h"25#include "platform/platform_infos_def.h"
26#include "op_host/tiling_base.h"26#include "op_host/tiling_base.h"
27#include "op_host/tiling_util.h"27#include "op_host/tiling_util.h"
28-#include "op_api/runtime2_util.h"28+#include "op_api/runtime2_util_nn.h"
29#include "op_common/op_host/util/platform_util.h"29#include "op_common/op_host/util/platform_util.h"
30#include "op_host/tiling_templates_registry.h"30#include "op_host/tiling_templates_registry.h"
31 31 
@@ -14,7 +14,7 @@
14 */14 */
15#include "log/log.h"15#include "log/log.h"
16#include "register/op_impl_registry.h"16#include "register/op_impl_registry.h"
17-#include "op_api/runtime2_util.h"17+#include "op_api/runtime2_util_nn.h"
18 18 
19using namespace ge;19using namespace ge;
20namespace ops {20namespace ops {
@@ -76,4 +76,4 @@ static ge::graphStatus BatchNormInferDataType(gert::InferDataTypeContext* contex
76}76}
77 77 
78IMPL_OP_INFERSHAPE(BatchNorm).InferShape(BatchNormInferShape).InferDataType(BatchNormInferDataType);78IMPL_OP_INFERSHAPE(BatchNorm).InferShape(BatchNormInferShape).InferDataType(BatchNormInferDataType);
79-} // namespace ops79+} // namespace ops
@@ -25,7 +25,7 @@
25#include "platform/platform_infos_def.h"25#include "platform/platform_infos_def.h"
26#include "op_host/tiling_base.h"26#include "op_host/tiling_base.h"
27#include "op_host/tiling_util.h"27#include "op_host/tiling_util.h"
28-#include "op_api/runtime2_util.h"28+#include "op_api/runtime2_util_nn.h"
29#include "op_common/op_host/util/platform_util.h"29#include "op_common/op_host/util/platform_util.h"
30#include "op_host/tiling_templates_registry.h"30#include "op_host/tiling_templates_registry.h"
31#include "../../op_kernel/arch35/batch_norm3_d_tiling_data.h"31#include "../../op_kernel/arch35/batch_norm3_d_tiling_data.h"
@@ -14,7 +14,7 @@
14 */14 */
15#include "log/log.h"15#include "log/log.h"
16#include "register/op_impl_registry.h"16#include "register/op_impl_registry.h"
17-#include "op_api/runtime2_util.h"17+#include "op_api/runtime2_util_nn.h"
18 18 
19using namespace ge;19using namespace ge;
20namespace ops {20namespace ops {
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -13,7 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15#include "group_norm_tiling_arch35.h"15#include "group_norm_tiling_arch35.h"
16-#include "op_api/runtime2_util.h"16+#include "op_api/runtime2_util_nn.h"
17#include "error_util.h"17#include "error_util.h"
18#include <nlohmann/json.hpp>18#include <nlohmann/json.hpp>
19#include "op_host/tiling_templates_registry.h"19#include "op_host/tiling_templates_registry.h"
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -20,7 +20,7 @@
20#include "register/op_impl_registry.h"20#include "register/op_impl_registry.h"
21#include "register/tilingdata_base.h"21#include "register/tilingdata_base.h"
22#include "op_host/tiling_base.h"22#include "op_host/tiling_base.h"
23-#include "op_api/runtime2_util.h"23+#include "op_api/runtime2_util_nn.h"
24#include "op_common/op_host/util/platform_util.h"24#include "op_common/op_host/util/platform_util.h"
25 25 
26namespace optiling {26namespace optiling {
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -13,7 +13,7 @@
13 * \brief13 * \brief
14 */14 */
15#include "group_norm_v2_tiling_arch35.h"15#include "group_norm_v2_tiling_arch35.h"
16-#include "op_api/runtime2_util.h"16+#include "op_api/runtime2_util_nn.h"
17#include "error_util.h"17#include "error_util.h"
18#include <nlohmann/json.hpp>18#include <nlohmann/json.hpp>
19#include "op_host/tiling_templates_registry.h"19#include "op_host/tiling_templates_registry.h"
@@ -383,7 +383,7 @@ static void SetTilingKey4Ascend950(const gert::TilingContext* context, int64_t&
383 otherUbSize += dichotomyAddExtraSize;383 otherUbSize += dichotomyAddExtraSize;
384 384 
385 ubRemain = ubSize <= otherUbSize ? 0 : ubSize - otherUbSize;385 ubRemain = ubSize <= otherUbSize ? 0 : ubSize - otherUbSize;
386- OP_CHECK_IF((xDtypeSize == 0), OP_LOGE(context->GetNodeName(), "xDtypeSize is zero."), return );386+ OP_CHECK_IF((xDtypeSize == 0), OP_LOGE(context->GetNodeName(), "xDtypeSize is zero."), return);
387 maxReduceCount = (ubRemain / (DOUBLE_BUFFER * BUFFER_NUM)) / xDtypeSize;387 maxReduceCount = (ubRemain / (DOUBLE_BUFFER * BUFFER_NUM)) / xDtypeSize;
388 388 
389 if (maxReduceCount > reduceCount) {389 if (maxReduceCount > reduceCount) {
@@ -451,11 +451,11 @@ static void SetWelfordParallelN(const gert::TilingContext* context, int64_t xDty
451{451{
452 auto compileInfo = context->GetCompileInfo<GroupNormV2CompileInfo>();452 auto compileInfo = context->GetCompileInfo<GroupNormV2CompileInfo>();
453 int64_t blockSize = compileInfo->blockSize;453 int64_t blockSize = compileInfo->blockSize;
454- OP_CHECK_IF((xDtypeSize == 0), OP_LOGE(context->GetNodeName(), "xDtypeSize is zero."), return );454+ OP_CHECK_IF((xDtypeSize == 0), OP_LOGE(context->GetNodeName(), "xDtypeSize is zero."), return);
455 int64_t coeff = FLOAT32_BYTES / xDtypeSize;455 int64_t coeff = FLOAT32_BYTES / xDtypeSize;
456 int64_t totalNum = BUFFER_NUM * (coeff + 1);456 int64_t totalNum = BUFFER_NUM * (coeff + 1);
457 int64_t welfordBase = blockSize / xDtypeSize;457 int64_t welfordBase = blockSize / xDtypeSize;
458- OP_CHECK_IF((totalNum == 0), OP_LOGE(context->GetNodeName(), "TotalNum is zero."), return );458+ OP_CHECK_IF((totalNum == 0), OP_LOGE(context->GetNodeName(), "TotalNum is zero."), return);
459 int64_t maxParallelN = DownAlign((ubRemain / xDtypeSize) / totalNum, welfordBase);459 int64_t maxParallelN = DownAlign((ubRemain / xDtypeSize) / totalNum, welfordBase);
460 460 
461 int64_t dichotomyAddPower = 0;461 int64_t dichotomyAddPower = 0;
@@ -491,10 +491,10 @@ static void SetUbTiling4TwoPass(const gert::TilingContext* context, GroupNormV2T
491 auto compileInfo = context->GetCompileInfo<GroupNormV2CompileInfo>();491 auto compileInfo = context->GetCompileInfo<GroupNormV2CompileInfo>();
492 int64_t blockSize = compileInfo->blockSize;492 int64_t blockSize = compileInfo->blockSize;
493 int64_t elemNum = tilingData.get_elemNum();493 int64_t elemNum = tilingData.get_elemNum();
494- OP_CHECK_IF((xDtypeSize == 0), OP_LOGE(context->GetNodeName(), "xDtypeSize is zero."), return );494+ OP_CHECK_IF((xDtypeSize == 0), OP_LOGE(context->GetNodeName(), "xDtypeSize is zero."), return);
495 int64_t elemNumAlign = RoundUp(elemNum, blockSize / xDtypeSize);495 int64_t elemNumAlign = RoundUp(elemNum, blockSize / xDtypeSize);
496 SetDichotomyAddParams(context, tilingData);496 SetDichotomyAddParams(context, tilingData);
497- OP_CHECK_IF((elemNumAlign == 0), OP_LOGE(context->GetNodeName(), "ElemNumAlign is zero."), return );497+ OP_CHECK_IF((elemNumAlign == 0), OP_LOGE(context->GetNodeName(), "ElemNumAlign is zero."), return);
498 int64_t count = maxReduceCount / elemNumAlign;498 int64_t count = maxReduceCount / elemNumAlign;
499 int64_t processSize = count * elemNumAlign;499 int64_t processSize = count * elemNumAlign;
500 tilingData.set_processSize(processSize);500 tilingData.set_processSize(processSize);
@@ -521,7 +521,7 @@ static void SetUbTiling4WelfordPerf(const gert::TilingContext* context, GroupNor
521 SetWelfordParallelN(context, xDtypeSize, ubRemain, tilingData);521 SetWelfordParallelN(context, xDtypeSize, ubRemain, tilingData);
522 WelfordTilingInitResult result = InitWelfordTilingCommon(context, tilingData, blockSize, xDtypeSize);522 WelfordTilingInitResult result = InitWelfordTilingCommon(context, tilingData, blockSize, xDtypeSize);
523 OP_CHECK_IF((result.checkResult == false), OP_LOGE(context->GetNodeName(), "InitWelfordTilingCommon Failed."),523 OP_CHECK_IF((result.checkResult == false), OP_LOGE(context->GetNodeName(), "InitWelfordTilingCommon Failed."),
524- return );524+ return);
525 int64_t count = maxReduceCount / result.hwNumAlign;525 int64_t count = maxReduceCount / result.hwNumAlign;
526 if (count >= 1) {526 if (count >= 1) {
527 result.loopNum = CeilDiv(tilingData.get_shapeD(), count);527 result.loopNum = CeilDiv(tilingData.get_shapeD(), count);
@@ -549,7 +549,7 @@ static void SetUbTiling4WelfordGeneralized(const gert::TilingContext* context, G
549 int64_t blockSize = compileInfo->blockSize;549 int64_t blockSize = compileInfo->blockSize;
550 WelfordTilingInitResult result = InitWelfordTilingCommon(context, tilingData, blockSize, xDtypeSize);550 WelfordTilingInitResult result = InitWelfordTilingCommon(context, tilingData, blockSize, xDtypeSize);
551 OP_CHECK_IF((result.checkResult == false), OP_LOGE(context->GetNodeName(), "InitWelfordTilingCommon Failed."),551 OP_CHECK_IF((result.checkResult == false), OP_LOGE(context->GetNodeName(), "InitWelfordTilingCommon Failed."),
552- return );552+ return);
553 int64_t maxReduceCount = (ubRemain / (DOUBLE_BUFFER * BUFFER_NUM)) / xDtypeSize;553 int64_t maxReduceCount = (ubRemain / (DOUBLE_BUFFER * BUFFER_NUM)) / xDtypeSize;
554 int64_t count = maxReduceCount / result.hwNumAlign;554 int64_t count = maxReduceCount / result.hwNumAlign;
555 int64_t gammaRealSize = GetOptionalInputTensorSize(context, INPUT_IDX_GAMMA, count);555 int64_t gammaRealSize = GetOptionalInputTensorSize(context, INPUT_IDX_GAMMA, count);
@@ -710,4 +710,4 @@ static ge::graphStatus TilingPrepare4GroupNormV2(gert::TilingParseContext* conte
710 710 
711// register tiling interface of the GroupNormV2 op.711// register tiling interface of the GroupNormV2 op.
712IMPL_OP_OPTILING(GroupNormV2).Tiling(Tiling4GroupNormV2).TilingParse<GroupNormV2CompileInfo>(TilingPrepare4GroupNormV2);712IMPL_OP_OPTILING(GroupNormV2).Tiling(Tiling4GroupNormV2).TilingParse<GroupNormV2CompileInfo>(TilingPrepare4GroupNormV2);
713-} // namespace optiling713+} // namespace optiling
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -20,7 +20,7 @@
20#include "register/op_impl_registry.h"20#include "register/op_impl_registry.h"
21#include "register/tilingdata_base.h"21#include "register/tilingdata_base.h"
22#include "op_host/tiling_base.h"22#include "op_host/tiling_base.h"
23-#include "op_api/runtime2_util.h"23+#include "op_api/runtime2_util_nn.h"
24#include "op_common/op_host/util/platform_util.h"24#include "op_common/op_host/util/platform_util.h"
25 25 
26namespace optiling {26namespace optiling {
@@ -69,4 +69,4 @@ enum class GroupNormV2TilingKey : int64_t {
69 69 
70ge::graphStatus SetTilingData(gert::TilingContext* context);70ge::graphStatus SetTilingData(gert::TilingContext* context);
71} // namespace optiling71} // namespace optiling
72-#endif72+#endif
@@ -14,7 +14,7 @@
14 */14 */
15 15 
16#include "op_host/tiling_util.h"16#include "op_host/tiling_util.h"
17-#include "op_api/runtime2_util.h"17+#include "op_api/runtime2_util_nn.h"
18#include "layer_norm_tiling_arch35.h"18#include "layer_norm_tiling_arch35.h"
19 19 
20namespace optiling {20namespace optiling {
@@ -14,7 +14,7 @@
14 */14 */
15#include "log/log.h"15#include "log/log.h"
16#include "register/op_impl_registry.h"16#include "register/op_impl_registry.h"
17-#include "op_api/runtime2_util.h"17+#include "op_api/runtime2_util_nn.h"
18 18 
19using namespace Ops::Base;19using namespace Ops::Base;
20using namespace ge;20using namespace ge;
@@ -72,4 +72,4 @@ static graphStatus InferShape4LayerNorm(gert::InferShapeContext* context)
72}72}
73 73 
74IMPL_OP_INFERSHAPE(LayerNorm).InferShape(InferShape4LayerNorm);74IMPL_OP_INFERSHAPE(LayerNorm).InferShape(InferShape4LayerNorm);
75-} // namespace ops75+} // namespace ops
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -18,7 +18,7 @@
18#include "register/tilingdata_base.h"18#include "register/tilingdata_base.h"
19#include "layer_norm_v3_tiling.h"19#include "layer_norm_v3_tiling.h"
20#include "../../../../matmul/common/op_host/op_tiling/tiling_cache.h"20#include "../../../../matmul/common/op_host/op_tiling/tiling_cache.h"
21-#include "op_api/runtime2_util.h"21+#include "op_api/runtime2_util_nn.h"
22#include "../../../../matmul/common/op_host/op_tiling/hash.h"22#include "../../../../matmul/common/op_host/op_tiling/hash.h"
23#include "op_host/cache_runinfo.h"23#include "op_host/cache_runinfo.h"
24#include <nlohmann/json.hpp>24#include <nlohmann/json.hpp>
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
14 */14 */
15#include "log/log.h"15#include "log/log.h"
16#include "register/op_impl_registry.h"16#include "register/op_impl_registry.h"
17-#include "op_api/runtime2_util.h"17+#include "op_api/runtime2_util_nn.h"
18 18 
19using namespace Ops::Base;19using namespace Ops::Base;
20using namespace ge;20using namespace ge;
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
14 */14 */
15#include "log/log.h"15#include "log/log.h"
16#include "register/op_impl_registry.h"16#include "register/op_impl_registry.h"
17-#include "op_api/runtime2_util.h"17+#include "op_api/runtime2_util_nn.h"
18 18 
19using namespace ge;19using namespace ge;
20namespace ops {20namespace ops {
@@ -38,4 +38,4 @@ static ge::graphStatus InferShape4SyncBatchNormBackwardReduce(gert::InferShapeCo
38}38}
39 39 
40IMPL_OP_INFERSHAPE(SyncBatchNormBackwardReduce).InferShape(InferShape4SyncBatchNormBackwardReduce);40IMPL_OP_INFERSHAPE(SyncBatchNormBackwardReduce).InferShape(InferShape4SyncBatchNormBackwardReduce);
41-} // namespace ops41+} // namespace ops
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
14 */14 */
15#include "log/log.h"15#include "log/log.h"
16#include "register/op_impl_registry.h"16#include "register/op_impl_registry.h"
17-#include "op_api/runtime2_util.h"17+#include "op_api/runtime2_util_nn.h"
18 18 
19using namespace ge;19using namespace ge;
20namespace ops {20namespace ops {
@@ -1,5 +1,5 @@
1/**1/**
2- * Copyright (c) 2025 Huawei Technologies Co., Ltd.2+ * Copyright (c) 2025-2026 Huawei Technologies Co., Ltd.
3 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of3 * 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").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.5 * Please refer to the License for details. You may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
14 */14 */
15#include "log/log.h"15#include "log/log.h"
16#include "register/op_impl_registry.h"16#include "register/op_impl_registry.h"
17-#include "op_api/runtime2_util.h"17+#include "op_api/runtime2_util_nn.h"
18 18 
19using namespace ge;19using namespace ge;
20namespace ops {20namespace ops {
@@ -36,4 +36,4 @@ static ge::graphStatus InferShape4InIdx1AndOutIdx0(gert::InferShapeContext* cont
36}36}
37 37 
38IMPL_OP_INFERSHAPE(SyncBNTrainingUpdate).InferShape(InferShape4InIdx1AndOutIdx0);38IMPL_OP_INFERSHAPE(SyncBNTrainingUpdate).InferShape(InferShape4InIdx1AndOutIdx0);
39-} // namespace ops39+} // namespace ops