已合并
[fix]v220算子编译修复 #2303
[fix]v220算子编译修复 #2303
已合并
zhoucy创建于 3月13日
60 个文件变更+117-7
@@ -20,7 +20,7 @@ import subprocess
20from pathlib import Path20from pathlib import Path
21 21 
22CHANGES = "changes.txt"22CHANGES = "changes.txt"
23-ALLOWED_EXTENSIONS = {'.py', '.h', '.cpp', '.hpp', '.sh'}23+ALLOWED_EXTENSIONS = {'.py', '.h', '.cpp', '.hpp', '.sh', '.cmake'}
24MODULE_MAPS = {24MODULE_MAPS = {
25 'common': 'hstu',25 'common': 'hstu',
26 'cmake': 'hstu',26 'cmake': 'hstu',
@@ -67,6 +67,8 @@ fi
67# vendor_name需要和aclnn中的CMakeLists.txt中的CUST_PKG_PATH值同步,不同步aclnn会调用失败;67# vendor_name需要和aclnn中的CMakeLists.txt中的CUST_PKG_PATH值同步,不同步aclnn会调用失败;
68# vendor_name字段值不能包含customize;包含会导致多算子部署场景CANN的vendors路径下config.ini文件内容截取错误68# vendor_name字段值不能包含customize;包含会导致多算子部署场景CANN的vendors路径下config.ini文件内容截取错误
69sed -i 's:"customize":"cust_op_by_addr":g' CMakePresets.json69sed -i 's:"customize":"cust_op_by_addr":g' CMakePresets.json
70+sed -i "1i #define SUPPORT_950" ./op_host/embedding_update_by_address.cpp
simmerchan
simmerchansimmerchan3月16日

问题类型: 编码规范

问题描述: 在多个算子的 run.sh 脚本中,通过 sed 命令在文件头部插入#define SUPPORT_950 宏定义。这种修改方式会导致每次构建时都重新修改源文件,可能引起版本控制混乱和构建不一致性问题。

文件路径: cust_op/ascendc_op/ai_core_op/cust_op_by_addr/c310/run.sh

代码行号: 70

修改建议: 建议改用编译时宏定义方式,在 CMakeLists.txt 或编译命令中通过-D 参数传递 SUPPORT_950 宏,例如:add_definitions(-DSUPPORT_950) 或在 cmake 预设中配置 compile_definitions。这样避免修改源文件,保持源码纯净。

likedislike
zhoucy
zhoucy
3月17日 评论:
taoqiuyu1998
taoqiuyu1998
3月17日 评论:
71+sed -i "1i #define SUPPORT_950" ./op_host/embedding_lookup_by_address.cpp
70 72 
71bash build.sh73bash build.sh
72 74 
@@ -225,7 +225,9 @@ namespace ops {
225 this->AICore().AddConfig("ascend910b", aicConfig);225 this->AICore().AddConfig("ascend910b", aicConfig);
226 this->AICore().AddConfig("ascend910", aicConfig);226 this->AICore().AddConfig("ascend910", aicConfig);
227 this->AICore().AddConfig("ascend910_93", aicConfig);227 this->AICore().AddConfig("ascend910_93", aicConfig);
228+#ifdef SUPPORT_950
228 this->AICore().AddConfig("ascend950", aicConfig);229 this->AICore().AddConfig("ascend950", aicConfig);
230+#endif
229 }231 }
230 };232 };
231 233 
@@ -208,7 +208,9 @@ namespace ops {
208 this->AICore().AddConfig("ascend910b", aicConfig);208 this->AICore().AddConfig("ascend910b", aicConfig);
209 this->AICore().AddConfig("ascend910", aicConfig);209 this->AICore().AddConfig("ascend910", aicConfig);
210 this->AICore().AddConfig("ascend910_93", aicConfig);210 this->AICore().AddConfig("ascend910_93", aicConfig);
211+#ifdef SUPPORT_950
211 this->AICore().AddConfig("ascend950", aicConfig);212 this->AICore().AddConfig("ascend950", aicConfig);
213+#endif
212 }214 }
213 };215 };
214 OP_ADD(EmbeddingUpdateByAddress);216 OP_ADD(EmbeddingUpdateByAddress);
@@ -71,6 +71,7 @@ sed -i 's:"customize":"dense_embedding_codegen_lookup_function":g' CMakePresets.
71line=`awk '/ENABLE_SOURCE_PACKAGE/{print NR}' CMakePresets.json`71line=`awk '/ENABLE_SOURCE_PACKAGE/{print NR}' CMakePresets.json`
72line=`expr ${line} + 2`72line=`expr ${line} + 2`
73sed -i "${line}s/True/False/g" CMakePresets.json73sed -i "${line}s/True/False/g" CMakePresets.json
74+sed -i "1i #define SUPPORT_950" ./op_host/dense_embedding_codegen_lookup_function.cpp
74 75 
75# 增加LOG_CPP编译选项支持错误日志打印76# 增加LOG_CPP编译选项支持错误日志打印
76sed -i "1 i include(../../../../cmake/func.cmake)" ./op_host/CMakeLists.txt77sed -i "1 i include(../../../../cmake/func.cmake)" ./op_host/CMakeLists.txt
@@ -333,7 +333,9 @@ public:
333 this->AICore().SetTiling(optiling::TilingFunc);333 this->AICore().SetTiling(optiling::TilingFunc);
334 this->AICore().AddConfig("ascend910b");334 this->AICore().AddConfig("ascend910b");
335 this->AICore().AddConfig("ascend910_93");335 this->AICore().AddConfig("ascend910_93");
336+#ifdef SUPPORT_950
336 this->AICore().AddConfig("ascend950");337 this->AICore().AddConfig("ascend950");
338+#endif
337 }339 }
338};340};
339 341 
@@ -71,6 +71,7 @@ sed -i 's:"customize":"dense_embedding_codegen_lookup_function_grad":g' CMakePre
71line=`awk '/ENABLE_SOURCE_PACKAGE/{print NR}' CMakePresets.json`71line=`awk '/ENABLE_SOURCE_PACKAGE/{print NR}' CMakePresets.json`
72line=`expr ${line} + 2`72line=`expr ${line} + 2`
73sed -i "${line}s/True/False/g" CMakePresets.json73sed -i "${line}s/True/False/g" CMakePresets.json
74+sed -i "1i #define SUPPORT_950" ./op_host/dense_embedding_codegen_lookup_function_grad.cpp
74 75 
75# 增加LOG_CPP编译选项支持错误日志打印76# 增加LOG_CPP编译选项支持错误日志打印
76sed -i "1 i include(../../../../cmake/func.cmake)" ./op_host/CMakeLists.txt77sed -i "1 i include(../../../../cmake/func.cmake)" ./op_host/CMakeLists.txt
@@ -335,7 +335,9 @@ public:
335 this->AICore().SetTiling(optiling::TilingFunc);335 this->AICore().SetTiling(optiling::TilingFunc);
336 this->AICore().AddConfig("ascend910b");336 this->AICore().AddConfig("ascend910b");
337 this->AICore().AddConfig("ascend910_93");337 this->AICore().AddConfig("ascend910_93");
338+#ifdef SUPPORT_950
338 this->AICore().AddConfig("ascend950");339 this->AICore().AddConfig("ascend950");
340+#endif
339 }341 }
340};342};
341 343 
@@ -71,6 +71,7 @@ sed -i 's:"customize":"dense_to_jagged":g' CMakePresets.json
71line=`awk '/ENABLE_SOURCE_PACKAGE/{print NR}' CMakePresets.json`71line=`awk '/ENABLE_SOURCE_PACKAGE/{print NR}' CMakePresets.json`
72line=`expr ${line} + 2`72line=`expr ${line} + 2`
73sed -i "${line}s/True/False/g" CMakePresets.json73sed -i "${line}s/True/False/g" CMakePresets.json
74+sed -i "1i #define SUPPORT_950" ./op_host/dense_to_jagged.cpp
74 75 
75# 增加LOG_CPP编译选项支持错误日志打印76# 增加LOG_CPP编译选项支持错误日志打印
76sed -i "1 i include(../../../../cmake/func.cmake)" ./op_host/CMakeLists.txt77sed -i "1 i include(../../../../cmake/func.cmake)" ./op_host/CMakeLists.txt
@@ -175,7 +175,9 @@ public:
175 this->AICore().AddConfig("ascend910b");175 this->AICore().AddConfig("ascend910b");
176 this->AICore().AddConfig("ascend910_93");176 this->AICore().AddConfig("ascend910_93");
177 this->AICore().AddConfig("ascend310p");177 this->AICore().AddConfig("ascend310p");
178+#ifdef SUPPORT_950
178 this->AICore().AddConfig("ascend950");179 this->AICore().AddConfig("ascend950");
180+#endif
179 }181 }
180};182};
181 183 
@@ -72,6 +72,8 @@ line=`awk '/ENABLE_SOURCE_PACKAGE/{print NR}' CMakePresets.json`
72line=`expr ${line} + 2`72line=`expr ${line} + 2`
73sed -i "${line}s/True/False/g" CMakePresets.json73sed -i "${line}s/True/False/g" CMakePresets.json
74 74 
75+sed -i "1i #define SUPPORT_950" ./op_host/disetangle_attention.cpp
76+ 
75# 增加LOG_CPP编译选项支持错误日志打印77# 增加LOG_CPP编译选项支持错误日志打印
76sed -i "1 i include(../../../../cmake/func.cmake)" ./op_host/CMakeLists.txt78sed -i "1 i include(../../../../cmake/func.cmake)" ./op_host/CMakeLists.txt
77 79 
@@ -319,7 +319,9 @@ public:
319 this->AICore().SetTiling(optiling::TilingFunc);319 this->AICore().SetTiling(optiling::TilingFunc);
320 this->AICore().AddConfig("ascend910b");320 this->AICore().AddConfig("ascend910b");
321 this->AICore().AddConfig("ascend910_93");321 this->AICore().AddConfig("ascend910_93");
322+#ifdef SUPPORT_950
322 this->AICore().AddConfig("ascend950");323 this->AICore().AddConfig("ascend950");
324+#endif
323 }325 }
324};326};
325 327 
@@ -67,6 +67,8 @@ fi
67# vendor_name字段值不能包含customize;包含会导致多算子部署场景CANN的vendors路径下config.ini文件内容截取错误67# vendor_name字段值不能包含customize;包含会导致多算子部署场景CANN的vendors路径下config.ini文件内容截取错误
simmerchan
simmerchansimmerchan3月16日

问题类型: 性能问题

问题描述: 当前方案对 58 个算子文件都添加了相同的 sed 命令,存在大量重复代码。如果未来需要添加新的芯片支持,需要在每个算子的 run.sh 中重复添加类似的 sed 命令,维护成本高且容易遗漏。

文件路径: cust_op/ascendc_op/ai_core_op/fused_lazy_adam/c310/run.sh

代码行号: 67

修改建议: 建议抽取公共的芯片配置逻辑到统一的构建脚本或 CMake 宏中,例如创建 chips_config.cmake 或在顶层 CMakeLists.txt 中统一管理芯片支持配置,各算子通过 include 或调用宏来继承配置,减少重复代码。

likedislike
zhoucy
zhoucy
3月17日 评论:
68sed -i 's:"customize":"mxrec_fused_lazy_adam":g' CMakePresets.json68sed -i 's:"customize":"mxrec_fused_lazy_adam":g' CMakePresets.json
69 69 
70+sed -i "1i #define SUPPORT_950" ./op_host/lazy_adam.cpp
71+ 
70# 增加LOG_CPP编译选项支持错误日志打印72# 增加LOG_CPP编译选项支持错误日志打印
71sed -i "1 i include(../../../../cmake/func.cmake)" ./op_host/CMakeLists.txt73sed -i "1 i include(../../../../cmake/func.cmake)" ./op_host/CMakeLists.txt
72 74 
@@ -234,7 +234,9 @@ public:
234 this->AICore().SetTiling(optiling::LazyAdamTilingFunc);234 this->AICore().SetTiling(optiling::LazyAdamTilingFunc);
235 this->AICore().AddConfig("ascend910b");235 this->AICore().AddConfig("ascend910b");
236 this->AICore().AddConfig("ascend910_93");236 this->AICore().AddConfig("ascend910_93");
237+#ifdef SUPPORT_950
237 this->AICore().AddConfig("ascend950");238 this->AICore().AddConfig("ascend950");
239+#endif
238 }240 }
239};241};
240 242 
@@ -67,6 +67,8 @@ fi
67# vendor_name字段值不能包含customize;包含会导致多算子部署场景CANN的vendors路径下config.ini文件内容截取错误67# vendor_name字段值不能包含customize;包含会导致多算子部署场景CANN的vendors路径下config.ini文件内容截取错误
68sed -i 's:"customize":"mxrec_fused_agd":g' CMakePresets.json68sed -i 's:"customize":"mxrec_fused_agd":g' CMakePresets.json
69 69 
70+sed -i "1i #define SUPPORT_950" ./op_host/sgd.cpp
71+ 
70# 增加LOG_CPP编译选项支持错误日志打印72# 增加LOG_CPP编译选项支持错误日志打印
71sed -i "1 i include(../../../../cmake/func.cmake)" ./op_host/CMakeLists.txt73sed -i "1 i include(../../../../cmake/func.cmake)" ./op_host/CMakeLists.txt
72 74 
@@ -257,7 +257,9 @@ public:
257 .SetTiling(optiling::TilingFunc);257 .SetTiling(optiling::TilingFunc);
258 this->AICore().AddConfig("ascend910b");258 this->AICore().AddConfig("ascend910b");
259 this->AICore().AddConfig("ascend910_93");259 this->AICore().AddConfig("ascend910_93");
260+#ifdef SUPPORT_950
260 this->AICore().AddConfig("ascend950");261 this->AICore().AddConfig("ascend950");
262+#endif
261 }263 }
262};264};
263 265 
@@ -71,6 +71,8 @@ fi
71# vendor_name字段值不能包含customize;包含会导致多算子部署场景CANN的vendors路径下config.ini文件内容截取错误71# vendor_name字段值不能包含customize;包含会导致多算子部署场景CANN的vendors路径下config.ini文件内容截取错误
72sed -i 's:"customize":"gather_for_rank1":g' CMakePresets.json72sed -i 's:"customize":"gather_for_rank1":g' CMakePresets.json
73 73 
74+sed -i "1i #define SUPPORT_950" ./op_host/gather_for_rank1.cpp
75+ 
74line=`awk '/ENABLE_SOURCE_PACKAGE/{print NR}' CMakePresets.json`76line=`awk '/ENABLE_SOURCE_PACKAGE/{print NR}' CMakePresets.json`
75line=`expr ${line} + 2`77line=`expr ${line} + 2`
76sed -i "${line}s/True/False/g" CMakePresets.json78sed -i "${line}s/True/False/g" CMakePresets.json
@@ -132,7 +132,9 @@ public:
132 this->AICore().AddConfig("ascend910b", aicore_config);132 this->AICore().AddConfig("ascend910b", aicore_config);
133 this->AICore().AddConfig("ascend910_93", aicore_config);133 this->AICore().AddConfig("ascend910_93", aicore_config);
134 this->AICore().AddConfig("ascend310p", aicore_config);134 this->AICore().AddConfig("ascend310p", aicore_config);
135+#ifdef SUPPORT_950
135 this->AICore().AddConfig("ascend950", aicore_config);136 this->AICore().AddConfig("ascend950", aicore_config);
137+#endif
136 }138 }
137};139};
138 140 
@@ -71,6 +71,9 @@ fi
71# vendor_name字段值不能包含customize;包含会导致多算子部署场景CANN的vendors路径下config.ini文件内容截取错误71# vendor_name字段值不能包含customize;包含会导致多算子部署场景CANN的vendors路径下config.ini文件内容截取错误
72sed -i 's:"customize":"hstu_dense_backward":g' CMakePresets.json72sed -i 's:"customize":"hstu_dense_backward":g' CMakePresets.json
73 73 
74+sed -i "1i #define SUPPORT_950" ./op_host/hstu_dense_backward.cpp
75+sed -i "1i #define SUPPORT_950" ./op_host/hstu_jagged_backward.cpp
76+ 
74line=`awk '/ENABLE_SOURCE_PACKAGE/{print NR}' CMakePresets.json`77line=`awk '/ENABLE_SOURCE_PACKAGE/{print NR}' CMakePresets.json`
75line=`expr ${line} + 2`78line=`expr ${line} + 2`
76sed -i "${line}s/True/False/g" CMakePresets.json79sed -i "${line}s/True/False/g" CMakePresets.json
@@ -311,7 +311,9 @@ public:
311 this->AICore().SetTiling(optiling::TilingFunc);311 this->AICore().SetTiling(optiling::TilingFunc);
312 this->AICore().AddConfig("ascend910b", aicore_config);312 this->AICore().AddConfig("ascend910b", aicore_config);
313 this->AICore().AddConfig("ascend910_93", aicore_config);313 this->AICore().AddConfig("ascend910_93", aicore_config);
314+#ifdef SUPPORT_950
314 this->AICore().AddConfig("ascend950", aicore_config);315 this->AICore().AddConfig("ascend950", aicore_config);
316+#endif
315 }317 }
316};318};
317 319 
@@ -320,7 +320,9 @@ public:
320 this->AICore().SetTiling(optiling::TilingFuncJagged);320 this->AICore().SetTiling(optiling::TilingFuncJagged);
321 this->AICore().AddConfig("ascend910b", aicore_config);321 this->AICore().AddConfig("ascend910b", aicore_config);
322 this->AICore().AddConfig("ascend910_93", aicore_config);322 this->AICore().AddConfig("ascend910_93", aicore_config);
323+#ifdef SUPPORT_950
323 this->AICore().AddConfig("ascend950", aicore_config);324 this->AICore().AddConfig("ascend950", aicore_config);
325+#endif
324 }326 }
325};327};
326 328 
@@ -73,6 +73,8 @@ fi
73# vendor_name字段值不能包含customize;包含会导致多算子部署场景CANN的vendors路径下config.ini文件内容截取错误73# vendor_name字段值不能包含customize;包含会导致多算子部署场景CANN的vendors路径下config.ini文件内容截取错误
74sed -i 's:"customize":"hstu_dense_backward_fuxi":g' CMakePresets.json74sed -i 's:"customize":"hstu_dense_backward_fuxi":g' CMakePresets.json
75 75 
76+sed -i "1i #define SUPPORT_950" ./op_host/hstu_dense_backward_fuxi.cpp
77+ 
76line=`awk '/ENABLE_SOURCE_PACKAGE/{print NR}' CMakePresets.json`78line=`awk '/ENABLE_SOURCE_PACKAGE/{print NR}' CMakePresets.json`
77line=`expr ${line} + 2`79line=`expr ${line} + 2`
78sed -i "${line}s/True/False/g" CMakePresets.json80sed -i "${line}s/True/False/g" CMakePresets.json
@@ -335,7 +335,9 @@ public:
335 this->AICore().SetTiling(optiling::TilingFunc);335 this->AICore().SetTiling(optiling::TilingFunc);
336 this->AICore().AddConfig("ascend910b", aicore_config);336 this->AICore().AddConfig("ascend910b", aicore_config);
337 this->AICore().AddConfig("ascend910_93", aicore_config);337 this->AICore().AddConfig("ascend910_93", aicore_config);
338+#ifdef SUPPORT_950
338 this->AICore().AddConfig("ascend950", aicore_config);339 this->AICore().AddConfig("ascend950", aicore_config);
340+#endif
339 }341 }
340};342};
341 343 
@@ -81,11 +81,13 @@ line=`awk '/ENABLE_SOURCE_PACKAGE/{print NR}' CMakePresets.json`
81line=`expr ${line} + 2`81line=`expr ${line} + 2`
82sed -i "${line}s/True/False/g" CMakePresets.json82sed -i "${line}s/True/False/g" CMakePresets.json
83 83 
84+sed -i "1i #define SUPPORT_950" ./op_kernel/hstu_common_const.h
84sed -i "1i #define SUPPORT_950" ./op_kernel/matmul_constexpr.h85sed -i "1i #define SUPPORT_950" ./op_kernel/matmul_constexpr.h
85sed -i "1i #define SUPPORT_950" ./op_kernel/hstu_dense_forward_jagged_kernel.h86sed -i "1i #define SUPPORT_950" ./op_kernel/hstu_dense_forward_jagged_kernel.h
86sed -i "1i #define SUPPORT_950" ./op_kernel/hstu_paged_forward_kernel.h87sed -i "1i #define SUPPORT_950" ./op_kernel/hstu_paged_forward_kernel.h
87sed -i "1i #define SUPPORT_950" ./op_host/hstu_jagged_forward.cpp88sed -i "1i #define SUPPORT_950" ./op_host/hstu_jagged_forward.cpp
88sed -i "1i #define SUPPORT_950" ./op_host/hstu_paged_forward.cpp89sed -i "1i #define SUPPORT_950" ./op_host/hstu_paged_forward.cpp
90+sed -i "1i #define SUPPORT_950" ./op_host/hstu_dense_forward.cpp
89sed -i "1i #define SUPPORT_950" ./op_host/tiling_policy.cpp91sed -i "1i #define SUPPORT_950" ./op_host/tiling_policy.cpp
90 92 
91add_cmake_line="install(FILES \${CMAKE_CURRENT_SOURCE_DIR}/../../../v220/hstu_dense_forward.json DESTINATION packages/vendors/\${vendor_name}/op_impl/ai_core/tbe/\${vendor_name}_impl/dynamic)"93add_cmake_line="install(FILES \${CMAKE_CURRENT_SOURCE_DIR}/../../../v220/hstu_dense_forward.json DESTINATION packages/vendors/\${vendor_name}/op_impl/ai_core/tbe/\${vendor_name}_impl/dynamic)"
@@ -117,7 +117,9 @@ public:
117 this->AICore().AddConfig("ascend310p", aicore_config);117 this->AICore().AddConfig("ascend310p", aicore_config);
118 this->AICore().AddConfig("ascend910b", aicore_config);118 this->AICore().AddConfig("ascend910b", aicore_config);
119 this->AICore().AddConfig("ascend910_93", aicore_config);119 this->AICore().AddConfig("ascend910_93", aicore_config);
120+#ifdef SUPPORT_950
majunwang_huawei

这里是不是忘了在run.sh里声明hstu_dense_forward文件添加支持950命名空间

likedislike
120 this->AICore().AddConfig("ascend950", aicore_config);121 this->AICore().AddConfig("ascend950", aicore_config);
122+#endif
121 }123 }
122};124};
123 125 
@@ -128,7 +128,9 @@ public:
128 128 
129 this->AICore().AddConfig("ascend910b", aicore_config);129 this->AICore().AddConfig("ascend910b", aicore_config);
130 this->AICore().AddConfig("ascend910_93", aicore_config);130 this->AICore().AddConfig("ascend910_93", aicore_config);
131+#ifdef SUPPORT_950
131 this->AICore().AddConfig("ascend950", aicore_config);132 this->AICore().AddConfig("ascend950", aicore_config);
133+#endif
132 }134 }
133};135};
134 136 
@@ -148,7 +148,9 @@ public:
148 148 
149 this->AICore().AddConfig("ascend910b", aicore_config);149 this->AICore().AddConfig("ascend910b", aicore_config);
150 this->AICore().AddConfig("ascend910_93", aicore_config);150 this->AICore().AddConfig("ascend910_93", aicore_config);
151+#ifdef SUPPORT_950
151 this->AICore().AddConfig("ascend950", aicore_config);152 this->AICore().AddConfig("ascend950", aicore_config);
153+#endif
152 }154 }
153};155};
154 156 
@@ -80,6 +80,8 @@ fi
80# vendor_name字段值不能包含customize;包含会导致多算子部署场景CANN的vendors路径下config.ini文件内容截取错误80# vendor_name字段值不能包含customize;包含会导致多算子部署场景CANN的vendors路径下config.ini文件内容截取错误
81sed -i 's:"customize":"hstu_dense_forward_fuxi":g' CMakePresets.json81sed -i 's:"customize":"hstu_dense_forward_fuxi":g' CMakePresets.json
82 82 
83+sed -i "1i #define SUPPORT_950" ./op_host/hstu_dense_forward_fuxi.cpp
84+ 
83line=`awk '/ENABLE_SOURCE_PACKAGE/{print NR}' CMakePresets.json`85line=`awk '/ENABLE_SOURCE_PACKAGE/{print NR}' CMakePresets.json`
84line=`expr ${line} + 2`86line=`expr ${line} + 2`
85sed -i "${line}s/True/False/g" CMakePresets.json87sed -i "${line}s/True/False/g" CMakePresets.json
@@ -143,7 +143,9 @@ public:
143 this->AICore().AddConfig("ascend310p", aicore_config);143 this->AICore().AddConfig("ascend310p", aicore_config);
144 this->AICore().AddConfig("ascend910b", aicore_config);144 this->AICore().AddConfig("ascend910b", aicore_config);
145 this->AICore().AddConfig("ascend910_93", aicore_config);145 this->AICore().AddConfig("ascend910_93", aicore_config);
146+#ifdef SUPPORT_950
146 this->AICore().AddConfig("ascend950", aicore_config);147 this->AICore().AddConfig("ascend950", aicore_config);
148+#endif
147 }149 }
148};150};
149 151 
@@ -90,6 +90,8 @@ fi
90# vendor_name字段值不能包含customize;包含会导致多算子部署场景CANN的vendors路径下config.ini文件内容截取错误90# vendor_name字段值不能包含customize;包含会导致多算子部署场景CANN的vendors路径下config.ini文件内容截取错误
91sed -i 's:"customize":"in_linear_silu":g' CMakePresets.json91sed -i 's:"customize":"in_linear_silu":g' CMakePresets.json
92 92 
93+sed -i "1i #define SUPPORT_950" ./op_host/in_linear_silu.cpp
94+ 
93sed -i "1i\add_ops_compile_options(ALL OPTIONS -DCATLASS_ARCH=3510 -DCATLASS_BISHENG_ARCH=a5 -DIS_A5=1 -DENABLE_CV_COMM_VIA_SSBUF=true -DCATLASS_HOME=${CATLASS_HOME} -I${catlass_include_dir})" ./op_kernel/CMakeLists.txt95sed -i "1i\add_ops_compile_options(ALL OPTIONS -DCATLASS_ARCH=3510 -DCATLASS_BISHENG_ARCH=a5 -DIS_A5=1 -DENABLE_CV_COMM_VIA_SSBUF=true -DCATLASS_HOME=${CATLASS_HOME} -I${catlass_include_dir})" ./op_kernel/CMakeLists.txt
94 96 
95# 增加LOG_CPP编译选项支持错误日志打印97# 增加LOG_CPP编译选项支持错误日志打印
@@ -169,7 +169,9 @@ public:
169 this->AICore().SetTiling(optiling::TilingFunc);169 this->AICore().SetTiling(optiling::TilingFunc);
170 this->AICore().AddConfig("ascend910b");170 this->AICore().AddConfig("ascend910b");
171 this->AICore().AddConfig("ascend910_93");171 this->AICore().AddConfig("ascend910_93");
172+#ifdef SUPPORT_950
172 this->AICore().AddConfig("ascend950");173 this->AICore().AddConfig("ascend950");
174+#endif
173 }175 }
174};176};
175 177 
@@ -68,6 +68,8 @@ fi
68# vendor_name字段值不能包含customize;包含会导致多算子部署场景CANN的vendors路径下config.ini文件内容截取错误68# vendor_name字段值不能包含customize;包含会导致多算子部署场景CANN的vendors路径下config.ini文件内容截取错误
69sed -i 's:"customize":"in_linear_silu_backward":g' CMakePresets.json69sed -i 's:"customize":"in_linear_silu_backward":g' CMakePresets.json
70 70 
71+sed -i "1i #define SUPPORT_950" ./op_host/in_linear_silu_backward.cpp
72+ 
71line=`awk '/ENABLE_SOURCE_PACKAGE/{print NR}' CMakePresets.json`73line=`awk '/ENABLE_SOURCE_PACKAGE/{print NR}' CMakePresets.json`
72line=`expr ${line} + 2`74line=`expr ${line} + 2`
73sed -i "${line}s/True/False/g" CMakePresets.json75sed -i "${line}s/True/False/g" CMakePresets.json
@@ -293,7 +293,9 @@ explicit InLinearSiluBackward(const char* name) : OpDef(name)
293 this->AICore().SetTiling(optiling::TilingFunc);293 this->AICore().SetTiling(optiling::TilingFunc);
294 this->AICore().AddConfig("ascend910b");294 this->AICore().AddConfig("ascend910b");
295 this->AICore().AddConfig("ascend910_93");295 this->AICore().AddConfig("ascend910_93");
296+#ifdef SUPPORT_950
296 this->AICore().AddConfig("ascend950");297 this->AICore().AddConfig("ascend950");
298+#endif
297 }299 }
298};300};
299 301 
@@ -68,6 +68,8 @@ fi
68# vendor_name字段值不能包含customize;包含会导致多算子部署场景CANN的vendors路径下config.ini文件内容截取错误68# vendor_name字段值不能包含customize;包含会导致多算子部署场景CANN的vendors路径下config.ini文件内容截取错误
69sed -i 's:"customize":"index_select_for_rank1_backward":g' CMakePresets.json69sed -i 's:"customize":"index_select_for_rank1_backward":g' CMakePresets.json
70 70 
71+sed -i "1i #define SUPPORT_950" ./op_host/index_select_for_rank1_backward.cpp
72+ 
71line=`awk '/ENABLE_SOURCE_PACKAGE/{print NR}' CMakePresets.json`73line=`awk '/ENABLE_SOURCE_PACKAGE/{print NR}' CMakePresets.json`
72line=`expr ${line} + 2`74line=`expr ${line} + 2`
73sed -i "${line}s/True/False/g" CMakePresets.json75sed -i "${line}s/True/False/g" CMakePresets.json
@@ -135,7 +135,9 @@ public:
135 this->AICore().SetTiling(optiling::TilingFunc);135 this->AICore().SetTiling(optiling::TilingFunc);
136 this->AICore().AddConfig("ascend910b");136 this->AICore().AddConfig("ascend910b");
137 this->AICore().AddConfig("ascend910_93");137 this->AICore().AddConfig("ascend910_93");
138+#ifdef SUPPORT_950
138 this->AICore().AddConfig("ascend950");139 this->AICore().AddConfig("ascend950");
140+#endif
139 }141 }
140};142};
141 143 
@@ -71,6 +71,8 @@ fi
71# vendor_name字段值不能包含customize;包含会导致多算子部署场景CANN的vendors路径下config.ini文件内容截取错误71# vendor_name字段值不能包含customize;包含会导致多算子部署场景CANN的vendors路径下config.ini文件内容截取错误
72sed -i 's:"customize":"jagged_to_padded_dense":g' CMakePresets.json72sed -i 's:"customize":"jagged_to_padded_dense":g' CMakePresets.json
73 73 
74+sed -i "1i #define SUPPORT_950" ./op_host/jagged_to_padded_dense.cpp
75+ 
74if [ "$ai_core" = "ai_core-Ascend310P3" ]; then76if [ "$ai_core" = "ai_core-Ascend310P3" ]; then
75 sed -i "1i #define SUPPORT_V200" ./op_kernel/jagged_to_padded_dense_kernel.h77 sed -i "1i #define SUPPORT_V200" ./op_kernel/jagged_to_padded_dense_kernel.h
76fi78fi
@@ -169,7 +169,9 @@ public:
169 this->AICore().AddConfig("ascend910b");169 this->AICore().AddConfig("ascend910b");
170 this->AICore().AddConfig("ascend910_93");170 this->AICore().AddConfig("ascend910_93");
171 this->AICore().AddConfig("ascend310p");171 this->AICore().AddConfig("ascend310p");
172+#ifdef SUPPORT_950
172 this->AICore().AddConfig("ascend950");173 this->AICore().AddConfig("ascend950");
174+#endif
173 }175 }
174};176};
175 177 
@@ -68,6 +68,7 @@ fi
68sed -i 's:"customize":"ln_mul":g' CMakePresets.json68sed -i 's:"customize":"ln_mul":g' CMakePresets.json
69 69 
70if [ "$ai_core" = "ai_core-Ascend950" ]; then70if [ "$ai_core" = "ai_core-Ascend950" ]; then
71+ sed -i "1i #define SUPPORT_950" ./op_host/ln_mul.cpp
71 sed -i "1i #define SUPPORT_950" ./op_kernel/ln_mul_kernel.h72 sed -i "1i #define SUPPORT_950" ./op_kernel/ln_mul_kernel.h
72fi73fi
73 74 
@@ -142,7 +142,9 @@ public:
142 this->AICore().AddConfig("ascend910b", aicore_config);142 this->AICore().AddConfig("ascend910b", aicore_config);
143 this->AICore().AddConfig("ascend910_93", aicore_config);143 this->AICore().AddConfig("ascend910_93", aicore_config);
144 this->AICore().AddConfig("ascend310p", aicore_config);144 this->AICore().AddConfig("ascend310p", aicore_config);
145+#ifdef SUPPORT_950
145 this->AICore().AddConfig("ascend950", aicore_config);146 this->AICore().AddConfig("ascend950", aicore_config);
147+#endif
146 }148 }
147};149};
148 150 
@@ -68,6 +68,8 @@ fi
68# vendor_name字段值不能包含customize;包含会导致多算子部署场景CANN的vendors路径下config.ini文件内容截取错误68# vendor_name字段值不能包含customize;包含会导致多算子部署场景CANN的vendors路径下config.ini文件内容截取错误
69sed -i 's:"customize":"multislice_concat":g' CMakePresets.json69sed -i 's:"customize":"multislice_concat":g' CMakePresets.json
70 70 
71+sed -i "1i #define SUPPORT_950" ./op_host/multislice_concat.cpp
72+ 
71line=`awk '/ENABLE_SOURCE_PACKAGE/{print NR}' CMakePresets.json`73line=`awk '/ENABLE_SOURCE_PACKAGE/{print NR}' CMakePresets.json`
72line=`expr ${line} + 2`74line=`expr ${line} + 2`
73sed -i "${line}s/True/False/g" CMakePresets.json75sed -i "${line}s/True/False/g" CMakePresets.json
@@ -234,8 +234,10 @@ public:
234 this->SetInferShape(ge::InferShape);234 this->SetInferShape(ge::InferShape);
235 this->SetInferDataType(ge::InferDataType);235 this->SetInferDataType(ge::InferDataType);
236 this->AICore().SetTiling(optiling::TilingFunc);236 this->AICore().SetTiling(optiling::TilingFunc);
237- this->AICore().AddConfig("ascend950");
238 this->AICore().AddConfig("ascend910b");237 this->AICore().AddConfig("ascend910b");
238+#ifdef SUPPORT_950
239+ this->AICore().AddConfig("ascend950");
240+#endif
239 }241 }
240};242};
241 243 
@@ -69,6 +69,8 @@ fi
69# vendor_name字段值不能包含customize;包含会导致多算子部署场景CANN的vendors路径下config.ini文件内容截取错误69# vendor_name字段值不能包含customize;包含会导致多算子部署场景CANN的vendors路径下config.ini文件内容截取错误
70sed -i 's:"customize":"permute2d_sparse_data":g' CMakePresets.json70sed -i 's:"customize":"permute2d_sparse_data":g' CMakePresets.json
71 71 
72+sed -i "1i #define SUPPORT_950" ./op_host/permute2d_sparse_data.cpp
73+ 
72line=`awk '/ENABLE_SOURCE_PACKAGE/{print NR}' CMakePresets.json`74line=`awk '/ENABLE_SOURCE_PACKAGE/{print NR}' CMakePresets.json`
73line=`expr ${line} + 2`75line=`expr ${line} + 2`
74sed -i "${line}s/True/False/g" CMakePresets.json76sed -i "${line}s/True/False/g" CMakePresets.json
@@ -231,7 +231,9 @@ public:
231 this->AICore().AddConfig("ascend910");231 this->AICore().AddConfig("ascend910");
232 this->AICore().AddConfig("ascend910b");232 this->AICore().AddConfig("ascend910b");
233 this->AICore().AddConfig("ascend910_93");233 this->AICore().AddConfig("ascend910_93");
234+#ifdef SUPPORT_950
234 this->AICore().AddConfig("ascend950");235 this->AICore().AddConfig("ascend950");
236+#endif
235 }237 }
236};238};
237 239 
@@ -68,6 +68,8 @@ fi
68# vendor_name字段值不能包含customize;包含会导致多算子部署场景CANN的vendors路径下config.ini文件内容截取错误68# vendor_name字段值不能包含customize;包含会导致多算子部署场景CANN的vendors路径下config.ini文件内容截取错误
69sed -i 's:"customize":"permute_pooled_embs":g' CMakePresets.json69sed -i 's:"customize":"permute_pooled_embs":g' CMakePresets.json
70 70 
71+sed -i "1i #define SUPPORT_950" ./op_host/permute_pooled_embs.cpp
72+ 
71line=`awk '/ENABLE_SOURCE_PACKAGE/{print NR}' CMakePresets.json`73line=`awk '/ENABLE_SOURCE_PACKAGE/{print NR}' CMakePresets.json`
72line=`expr ${line} + 2`74line=`expr ${line} + 2`
73sed -i "${line}s/True/False/g" CMakePresets.json75sed -i "${line}s/True/False/g" CMakePresets.json
@@ -153,7 +153,9 @@ public:
153 this->AICore().AddConfig("ascend910");153 this->AICore().AddConfig("ascend910");
154 this->AICore().AddConfig("ascend910b");154 this->AICore().AddConfig("ascend910b");
155 this->AICore().AddConfig("ascend910_93");155 this->AICore().AddConfig("ascend910_93");
156+#ifdef SUPPORT_950
156 this->AICore().AddConfig("ascend950");157 this->AICore().AddConfig("ascend950");
158+#endif
157 }159 }
158};160};
159 161 
@@ -68,6 +68,8 @@ fi
68# vendor_name字段值不能包含customize;包含会导致多算子部署场景CANN的vendors路径下config.ini文件内容截取错误68# vendor_name字段值不能包含customize;包含会导致多算子部署场景CANN的vendors路径下config.ini文件内容截取错误
69sed -i 's:"customize":"relative_attn_bias_backward":g' CMakePresets.json69sed -i 's:"customize":"relative_attn_bias_backward":g' CMakePresets.json
70 70 
71+sed -i "1i #define SUPPORT_950" ./op_host/relative_attn_bias_backward.cpp
72+ 
71line=`awk '/ENABLE_SOURCE_PACKAGE/{print NR}' CMakePresets.json`73line=`awk '/ENABLE_SOURCE_PACKAGE/{print NR}' CMakePresets.json`
72line=`expr ${line} + 2`74line=`expr ${line} + 2`
73sed -i "${line}s/True/False/g" CMakePresets.json75sed -i "${line}s/True/False/g" CMakePresets.json
@@ -224,7 +224,9 @@ public:
224 this->AICore().SetTiling(optiling::TilingFunc);224 this->AICore().SetTiling(optiling::TilingFunc);
225 this->AICore().AddConfig("ascend910b", aicore_config);225 this->AICore().AddConfig("ascend910b", aicore_config);
226 this->AICore().AddConfig("ascend910_93", aicore_config);226 this->AICore().AddConfig("ascend910_93", aicore_config);
227+#ifdef SUPPORT_950
227 this->AICore().AddConfig("ascend950", aicore_config);228 this->AICore().AddConfig("ascend950", aicore_config);
229+#endif
228 }230 }
229};231};
230 232 
@@ -68,6 +68,8 @@ fi
68# vendor_name字段值不能包含customize;包含会导致多算子部署场景CANN的vendors路径下config.ini文件内容截取错误68# vendor_name字段值不能包含customize;包含会导致多算子部署场景CANN的vendors路径下config.ini文件内容截取错误
69sed -i 's:"customize":"relative_attn_bias_pos":g' CMakePresets.json69sed -i 's:"customize":"relative_attn_bias_pos":g' CMakePresets.json
70 70 
71+sed -i "1i #define SUPPORT_950" ./op_host/relative_attn_bias_pos.cpp
72+ 
71line=`awk '/ENABLE_SOURCE_PACKAGE/{print NR}' CMakePresets.json`73line=`awk '/ENABLE_SOURCE_PACKAGE/{print NR}' CMakePresets.json`
72line=`expr ${line} + 2`74line=`expr ${line} + 2`
73sed -i "${line}s/True/False/g" CMakePresets.json75sed -i "${line}s/True/False/g" CMakePresets.json
@@ -192,7 +192,9 @@ public:
192 this->AICore().AddConfig("ascend910b", aicore_config);192 this->AICore().AddConfig("ascend910b", aicore_config);
193 this->AICore().AddConfig("ascend910_93", aicore_config);193 this->AICore().AddConfig("ascend910_93", aicore_config);
194 this->AICore().AddConfig("ascend310p", aicore_config);194 this->AICore().AddConfig("ascend310p", aicore_config);
195+#ifdef SUPPORT_950
195 this->AICore().AddConfig("ascend950", aicore_config);196 this->AICore().AddConfig("ascend950", aicore_config);
197+#endif
196 }198 }
197};199};
198 200 
@@ -68,6 +68,8 @@ fi
68# vendor_name字段值不能包含customize;包含会导致多算子部署场景CANN的vendors路径下config.ini文件内容截取错误68# vendor_name字段值不能包含customize;包含会导致多算子部署场景CANN的vendors路径下config.ini文件内容截取错误
69sed -i 's:"customize":"relative_attn_bias_time":g' CMakePresets.json69sed -i 's:"customize":"relative_attn_bias_time":g' CMakePresets.json
70 70 
71+sed -i "1i #define SUPPORT_950" ./op_host/relative_attn_bias_time.cpp
72+ 
71line=`awk '/ENABLE_SOURCE_PACKAGE/{print NR}' CMakePresets.json`73line=`awk '/ENABLE_SOURCE_PACKAGE/{print NR}' CMakePresets.json`
72line=`expr ${line} + 2`74line=`expr ${line} + 2`
73sed -i "${line}s/True/False/g" CMakePresets.json75sed -i "${line}s/True/False/g" CMakePresets.json
@@ -227,7 +227,9 @@ public:
227 this->AICore().AddConfig("ascend910b", aicore_config);227 this->AICore().AddConfig("ascend910b", aicore_config);
228 this->AICore().AddConfig("ascend910_93", aicore_config);228 this->AICore().AddConfig("ascend910_93", aicore_config);
229 this->AICore().AddConfig("ascend310p", aicore_config);229 this->AICore().AddConfig("ascend310p", aicore_config);
230+#ifdef SUPPORT_950
230 this->AICore().AddConfig("ascend950", aicore_config);231 this->AICore().AddConfig("ascend950", aicore_config);
232+#endif
231 }233 }
232};234};
233 235 
@@ -65,6 +65,8 @@ sed -i 's:"/usr/local/Ascend/latest":"/usr/local/Ascend/ascend-toolkit/latest":g
65# vendor_name字段值不能包含customize;包含会导致多算子部署场景CANN的vendors路径下config.ini文件内容截取错误65# vendor_name字段值不能包含customize;包含会导致多算子部署场景CANN的vendors路径下config.ini文件内容截取错误
66sed -i 's:"customize":"reverse_sequence":g' CMakePresets.json66sed -i 's:"customize":"reverse_sequence":g' CMakePresets.json
67 67 
68+sed -i "1i #define SUPPORT_950" ./op_host/reverse_sequence.cpp
69+ 
68if [ "$ai_core" = "ai_core-Ascend310P3" ]; then70if [ "$ai_core" = "ai_core-Ascend310P3" ]; then
69 sed -i "1i #define SUPPORT_V200" ./op_kernel/reverse_sequence.cpp71 sed -i "1i #define SUPPORT_V200" ./op_kernel/reverse_sequence.cpp
70 sed -i "1i #define SUPPORT_V200" ./op_host/reverse_sequence.cpp72 sed -i "1i #define SUPPORT_V200" ./op_host/reverse_sequence.cpp
@@ -176,7 +176,9 @@ public:
176 this->AICore().SetTiling(optiling::TilingFunc);176 this->AICore().SetTiling(optiling::TilingFunc);
177 this->AICore().AddConfig("ascend910b");177 this->AICore().AddConfig("ascend910b");
178 this->AICore().AddConfig("ascend910_93");178 this->AICore().AddConfig("ascend910_93");
179+#ifdef SUPPORT_950
179 this->AICore().AddConfig("ascend950");180 this->AICore().AddConfig("ascend950");
181+#endif
180 }182 }
181};183};
182 184 
@@ -65,6 +65,8 @@ sed -i 's:"/usr/local/Ascend/latest":"/usr/local/Ascend/ascend-toolkit/latest":g
65# vendor_name字段值不能包含customize;包含会导致多算子部署场景CANN的vendors路径下config.ini文件内容截取错误65# vendor_name字段值不能包含customize;包含会导致多算子部署场景CANN的vendors路径下config.ini文件内容截取错误
66sed -i 's:"customize":"segment_sum_csr":g' CMakePresets.json66sed -i 's:"customize":"segment_sum_csr":g' CMakePresets.json
67 67 
68+sed -i "1i #define SUPPORT_950" ./op_host/segment_sum_csr.cpp
69+ 
68if [ "$ai_core" = "ai_core-Ascend310P3" ]; then70if [ "$ai_core" = "ai_core-Ascend310P3" ]; then
69 sed -i "1i #define SUPPORT_V200" ./op_kernel/segment_sum_csr.cpp71 sed -i "1i #define SUPPORT_V200" ./op_kernel/segment_sum_csr.cpp
70 sed -i "1i #define SUPPORT_V200" ./op_host/segment_sum_csr.cpp72 sed -i "1i #define SUPPORT_V200" ./op_host/segment_sum_csr.cpp
@@ -131,7 +131,9 @@ public:
131 this->AICore().AddConfig("ascend910b", aicore_config);131 this->AICore().AddConfig("ascend910b", aicore_config);
132 this->AICore().AddConfig("ascend910_93", aicore_config);132 this->AICore().AddConfig("ascend910_93", aicore_config);
133 this->AICore().AddConfig("ascend310p", aicore_config);133 this->AICore().AddConfig("ascend310p", aicore_config);
134+#ifdef SUPPORT_950
134 this->AICore().AddConfig("ascend950", aicore_config);135 this->AICore().AddConfig("ascend950", aicore_config);
136+#endif
135 }137 }
136};138};
137 139 
@@ -65,7 +65,7 @@ fi
65sed -i 's:"customize":"select_dim1_to_permute":g' CMakePresets.json65sed -i 's:"customize":"select_dim1_to_permute":g' CMakePresets.json
66 66 
67# 添加C310编译选项67# 添加C310编译选项
68-sed -i "1i #define SUPPORT_C310" ./op_host/select_dim1_to_permute.cpp68+sed -i "1i #define SUPPORT_950" ./op_host/select_dim1_to_permute.cpp
69 69 
70line=`awk '/ENABLE_SOURCE_PACKAGE/{print NR}' CMakePresets.json`70line=`awk '/ENABLE_SOURCE_PACKAGE/{print NR}' CMakePresets.json`
71line=`expr ${line} + 2`71line=`expr ${line} + 2`
@@ -116,7 +116,7 @@ class SelectDim1ToPermute : public OpDef {
116public:116public:
117 explicit SelectDim1ToPermute(const char* name) : OpDef(name)117 explicit SelectDim1ToPermute(const char* name) : OpDef(name)
118 {118 {
119-#ifdef SUPPORT_C310119+#ifdef SUPPORT_950
120 this->Input("indices").ParamType(REQUIRED).DataType({ge::DT_INT32, ge::DT_INT64}).FormatList({ge::FORMAT_ND});120 this->Input("indices").ParamType(REQUIRED).DataType({ge::DT_INT32, ge::DT_INT64}).FormatList({ge::FORMAT_ND});
121 this->Output("permute").ParamType(REQUIRED).Follow("indices", FollowType::DTYPE).FormatList({ge::FORMAT_ND});121 this->Output("permute").ParamType(REQUIRED).Follow("indices", FollowType::DTYPE).FormatList({ge::FORMAT_ND});
122#else122#else
@@ -130,8 +130,10 @@ public:
130 this->SetInferDataType(ge::InferDataType);130 this->SetInferDataType(ge::InferDataType);
131 131 
132 this->AICore().SetTiling(optiling::TilingFunc);132 this->AICore().SetTiling(optiling::TilingFunc);
133- this->AICore().AddConfig("ascend950");
134 this->AICore().AddConfig("ascend910b");133 this->AICore().AddConfig("ascend910b");
134+#ifdef SUPPORT_950
135+ this->AICore().AddConfig("ascend950");
136+#endif
135 }137 }
136};138};
137 139 
@@ -68,7 +68,8 @@ fi
68sed -i 's:"customize":"token_mixing":g' CMakePresets.json68sed -i 's:"customize":"token_mixing":g' CMakePresets.json
69 69 
70# 添加C310编译选项70# 添加C310编译选项
71-sed -i "1i #define SUPPORT_C310" ./op_kernel/token_mixing.cpp71+sed -i "1i #define SUPPORT_950" ./op_kernel/token_mixing.cpp
72+sed -i "1i #define SUPPORT_950" ./op_host/token_mixing.cpp
72 73 
73# 增加LOG_CPP编译选项支持错误日志打印74# 增加LOG_CPP编译选项支持错误日志打印
74sed -i "1 i include(../../../../cmake/func.cmake)" ./op_host/CMakeLists.txt75sed -i "1 i include(../../../../cmake/func.cmake)" ./op_host/CMakeLists.txt
@@ -210,7 +210,9 @@ public:
210 210 
211 this->AICore().SetTiling(optiling::TilingFunc);211 this->AICore().SetTiling(optiling::TilingFunc);
212 this->AICore().AddConfig("ascend910b");212 this->AICore().AddConfig("ascend910b");
213+#ifdef SUPPORT_950
213 this->AICore().AddConfig("ascend950");214 this->AICore().AddConfig("ascend950");
215+#endif
214 }216 }
215};217};
216 218 
@@ -193,7 +193,7 @@ private:
193 Add(addTmpLocal, xLocal, xTLocal, bshLength_);193 Add(addTmpLocal, xLocal, xTLocal, bshLength_);
194 // shape194 // shape
195 uint32_t meanShape[2] = {static_cast<uint32_t>(rowCount), 1};195 uint32_t meanShape[2] = {static_cast<uint32_t>(rowCount), 1};
196-#ifdef SUPPORT_C310196+#ifdef SUPPORT_950
197 uint32_t shape[2] = {static_cast<uint32_t>(rowCount), static_cast<uint32_t>(args->xDim2WithPadding)};197 uint32_t shape[2] = {static_cast<uint32_t>(rowCount), static_cast<uint32_t>(args->xDim2WithPadding)};
198#else198#else
199 uint32_t shape[2] = {static_cast<uint32_t>(rowCount), static_cast<uint32_t>(args->xDim2)};199 uint32_t shape[2] = {static_cast<uint32_t>(rowCount), static_cast<uint32_t>(args->xDim2)};