已合并
feat: ThresholdV2 与 ConcatOffset 算子适配 ascend350/ascend960pr/ascend960dt #11280
esok11创建于 9月28日
feat: ThresholdV2 与 ConcatOffset 算子适配 ascend350/ascend960pr/ascend960dt #11280
已合并
esok11创建于 9月28日
共 11 个文件变更+1282-8
@@ -9,7 +9,7 @@
9# ----------------------------------------------------------------------------9# ----------------------------------------------------------------------------
10 10 
11# 设置算子定义时支持的芯片类型11# 设置算子定义时支持的芯片类型
12-set(SUPPORT_COMPUTE_UNIT "ascend950")12+set(SUPPORT_COMPUTE_UNIT "ascend950" "ascend350" "ascend960pr" "ascend960dt")
13# 设置每种芯片类型对应的tiling文件目录,即采用op_host目录下哪个文件夹下的tiling文件编译13# 设置每种芯片类型对应的tiling文件目录,即采用op_host目录下哪个文件夹下的tiling文件编译
14-set(SUPPORT_TILING_DIR "arch35")14+set(SUPPORT_TILING_DIR "arch35" "arch35" "arch35" "arch35")
15-add_modules_sources(HOSTNAME ${OPHOST_NAME} MODE PRIVATE DIR ${CMAKE_CURRENT_SOURCE_DIR} OPTYPE threshold_v2 ACLNNTYPE aclnn_exclude COMPUTE_UNIT ${SUPPORT_COMPUTE_UNIT} TILING_DIR ${SUPPORT_TILING_DIR} DISABLE_IN_OPP TRUE)15+add_modules_sources(HOSTNAME ${OPHOST_NAME} MODE PRIVATE DIR ${CMAKE_CURRENT_SOURCE_DIR} OPTYPE threshold_v2 ACLNNTYPE aclnn_exclude COMPUTE_UNIT ${SUPPORT_COMPUTE_UNIT} TILING_DIR ${SUPPORT_TILING_DIR} DISABLE_IN_OPP TRUE)
@@ -0,0 +1,381 @@
1+{
2+ "op_type": "ThresholdV2",
3+ "op_list": [
4+ {
5+ "bin_filename": "ThresholdV2_5771312ede1e42e5883dfb200d416cb0",
6+ "inputs": [
7+ {
8+ "name": "x",
9+ "index": 0,
10+ "dtype": "bfloat16",
11+ "format": "ND",
12+ "paramType": "required",
13+ "shape": [
14+ -2
15+ ]
16+ },
17+ {
18+ "name": "threshold",
19+ "index": 1,
20+ "dtype": "bfloat16",
21+ "format": "ND",
22+ "paramType": "required",
23+ "shape": [
24+ -2
25+ ]
26+ },
27+ {
28+ "name": "value",
29+ "index": 2,
30+ "dtype": "bfloat16",
31+ "format": "ND",
32+ "paramType": "optional",
33+ "shape": [
34+ -2
35+ ]
36+ }
37+ ],
38+ "outputs": [
39+ {
40+ "name": "y",
41+ "index": 0,
42+ "dtype": "bfloat16",
43+ "format": "ND",
44+ "paramType": "required",
45+ "shape": [
46+ -2
47+ ]
48+ }
49+ ]
50+ },
51+ {
52+ "bin_filename": "ThresholdV2_eea8ce60afe94bd4814c401e58047393",
53+ "inputs": [
54+ {
55+ "name": "x",
56+ "index": 0,
57+ "dtype": "float16",
58+ "format": "ND",
59+ "paramType": "required",
60+ "shape": [
61+ -2
62+ ]
63+ },
64+ {
65+ "name": "threshold",
66+ "index": 1,
67+ "dtype": "float16",
68+ "format": "ND",
69+ "paramType": "required",
70+ "shape": [
71+ -2
72+ ]
73+ },
74+ {
75+ "name": "value",
76+ "index": 2,
77+ "dtype": "float16",
78+ "format": "ND",
79+ "paramType": "optional",
80+ "shape": [
81+ -2
82+ ]
83+ }
84+ ],
85+ "outputs": [
86+ {
87+ "name": "y",
88+ "index": 0,
89+ "dtype": "float16",
90+ "format": "ND",
91+ "paramType": "required",
92+ "shape": [
93+ -2
94+ ]
95+ }
96+ ]
97+ },
98+ {
99+ "bin_filename": "ThresholdV2_cf23db81ef4f44c4902a242c92427474",
100+ "inputs": [
101+ {
102+ "name": "x",
103+ "index": 0,
104+ "dtype": "float32",
105+ "format": "ND",
106+ "paramType": "required",
107+ "shape": [
108+ -2
109+ ]
110+ },
111+ {
112+ "name": "threshold",
113+ "index": 1,
114+ "dtype": "float32",
115+ "format": "ND",
116+ "paramType": "required",
117+ "shape": [
118+ -2
119+ ]
120+ },
121+ {
122+ "name": "value",
123+ "index": 2,
124+ "dtype": "float32",
125+ "format": "ND",
126+ "paramType": "optional",
127+ "shape": [
128+ -2
129+ ]
130+ }
131+ ],
132+ "outputs": [
133+ {
134+ "name": "y",
135+ "index": 0,
136+ "dtype": "float32",
137+ "format": "ND",
138+ "paramType": "required",
139+ "shape": [
140+ -2
141+ ]
142+ }
143+ ]
144+ },
145+ {
146+ "bin_filename": "ThresholdV2_31b26d80653b487ea1aa4c5c12368acf",
147+ "inputs": [
148+ {
149+ "name": "x",
150+ "index": 0,
151+ "dtype": "int8",
152+ "format": "ND",
153+ "paramType": "required",
154+ "shape": [
155+ -2
156+ ]
157+ },
158+ {
159+ "name": "threshold",
160+ "index": 1,
161+ "dtype": "int8",
162+ "format": "ND",
163+ "paramType": "required",
164+ "shape": [
165+ -2
166+ ]
167+ },
168+ {
169+ "name": "value",
170+ "index": 2,
171+ "dtype": "int8",
172+ "format": "ND",
173+ "paramType": "optional",
174+ "shape": [
175+ -2
176+ ]
177+ }
178+ ],
179+ "outputs": [
180+ {
181+ "name": "y",
182+ "index": 0,
183+ "dtype": "int8",
184+ "format": "ND",
185+ "paramType": "required",
186+ "shape": [
187+ -2
188+ ]
189+ }
190+ ]
191+ },
192+ {
193+ "bin_filename": "ThresholdV2_7866d9f49c014447a554ec32b9054cef",
194+ "inputs": [
195+ {
196+ "name": "x",
197+ "index": 0,
198+ "dtype": "uint8",
199+ "format": "ND",
200+ "paramType": "required",
201+ "shape": [
202+ -2
203+ ]
204+ },
205+ {
206+ "name": "threshold",
207+ "index": 1,
208+ "dtype": "uint8",
209+ "format": "ND",
210+ "paramType": "required",
211+ "shape": [
212+ -2
213+ ]
214+ },
215+ {
216+ "name": "value",
217+ "index": 2,
218+ "dtype": "uint8",
219+ "format": "ND",
220+ "paramType": "optional",
221+ "shape": [
222+ -2
223+ ]
224+ }
225+ ],
226+ "outputs": [
227+ {
228+ "name": "y",
229+ "index": 0,
230+ "dtype": "uint8",
231+ "format": "ND",
232+ "paramType": "required",
233+ "shape": [
234+ -2
235+ ]
236+ }
237+ ]
238+ },
239+ {
240+ "bin_filename": "ThresholdV2_7c66b125a7064ca0b79f779a4e0fe2af",
241+ "inputs": [
242+ {
243+ "name": "x",
244+ "index": 0,
245+ "dtype": "int16",
246+ "format": "ND",
247+ "paramType": "required",
248+ "shape": [
249+ -2
250+ ]
251+ },
252+ {
253+ "name": "threshold",
254+ "index": 1,
255+ "dtype": "int16",
256+ "format": "ND",
257+ "paramType": "required",
258+ "shape": [
259+ -2
260+ ]
261+ },
262+ {
263+ "name": "value",
264+ "index": 2,
265+ "dtype": "int16",
266+ "format": "ND",
267+ "paramType": "optional",
268+ "shape": [
269+ -2
270+ ]
271+ }
272+ ],
273+ "outputs": [
274+ {
275+ "name": "y",
276+ "index": 0,
277+ "dtype": "int16",
278+ "format": "ND",
279+ "paramType": "required",
280+ "shape": [
281+ -2
282+ ]
283+ }
284+ ]
285+ },
286+ {
287+ "bin_filename": "ThresholdV2_3c66b177a7064ca0b79f779a4e0fe267",
288+ "inputs": [
289+ {
290+ "name": "x",
291+ "index": 0,
292+ "dtype": "int32",
293+ "format": "ND",
294+ "paramType": "required",
295+ "shape": [
296+ -2
297+ ]
298+ },
299+ {
300+ "name": "threshold",
301+ "index": 1,
302+ "dtype": "int32",
303+ "format": "ND",
304+ "paramType": "required",
305+ "shape": [
306+ -2
307+ ]
308+ },
309+ {
310+ "name": "value",
311+ "index": 2,
312+ "dtype": "int32",
313+ "format": "ND",
314+ "paramType": "optional",
315+ "shape": [
316+ -2
317+ ]
318+ }
319+ ],
320+ "outputs": [
321+ {
322+ "name": "y",
323+ "index": 0,
324+ "dtype": "int32",
325+ "format": "ND",
326+ "paramType": "required",
327+ "shape": [
328+ -2
329+ ]
330+ }
331+ ]
332+ },
333+ {
334+ "bin_filename": "ThresholdV2_97a7e1937ebe488b98e522dcfad25f4a",
335+ "inputs": [
336+ {
337+ "name": "x",
338+ "index": 0,
339+ "dtype": "int64",
340+ "format": "ND",
341+ "paramType": "required",
342+ "shape": [
343+ -2
344+ ]
345+ },
346+ {
347+ "name": "threshold",
348+ "index": 1,
349+ "dtype": "int64",
350+ "format": "ND",
351+ "paramType": "required",
352+ "shape": [
353+ -2
354+ ]
355+ },
356+ {
357+ "name": "value",
358+ "index": 2,
359+ "dtype": "int64",
360+ "format": "ND",
361+ "paramType": "optional",
362+ "shape": [
363+ -2
364+ ]
365+ }
366+ ],
367+ "outputs": [
368+ {
369+ "name": "y",
370+ "index": 0,
371+ "dtype": "int64",
372+ "format": "ND",
373+ "paramType": "required",
374+ "shape": [
375+ -2
376+ ]
377+ }
378+ ]
379+ }
380+ ]
381+ }
@@ -0,0 +1,381 @@
1+{
2+ "op_type": "ThresholdV2",
3+ "op_list": [
4+ {
5+ "bin_filename": "ThresholdV2_5771312ede1e42e5883dfb200d416cb0",
6+ "inputs": [
7+ {
8+ "name": "x",
9+ "index": 0,
10+ "dtype": "bfloat16",
11+ "format": "ND",
12+ "paramType": "required",
13+ "shape": [
14+ -2
15+ ]
16+ },
17+ {
18+ "name": "threshold",
19+ "index": 1,
20+ "dtype": "bfloat16",
21+ "format": "ND",
22+ "paramType": "required",
23+ "shape": [
24+ -2
25+ ]
26+ },
27+ {
28+ "name": "value",
29+ "index": 2,
30+ "dtype": "bfloat16",
31+ "format": "ND",
32+ "paramType": "optional",
33+ "shape": [
34+ -2
35+ ]
36+ }
37+ ],
38+ "outputs": [
39+ {
40+ "name": "y",
41+ "index": 0,
42+ "dtype": "bfloat16",
43+ "format": "ND",
44+ "paramType": "required",
45+ "shape": [
46+ -2
47+ ]
48+ }
49+ ]
50+ },
51+ {
52+ "bin_filename": "ThresholdV2_eea8ce60afe94bd4814c401e58047393",
53+ "inputs": [
54+ {
55+ "name": "x",
56+ "index": 0,
57+ "dtype": "float16",
58+ "format": "ND",
59+ "paramType": "required",
60+ "shape": [
61+ -2
62+ ]
63+ },
64+ {
65+ "name": "threshold",
66+ "index": 1,
67+ "dtype": "float16",
68+ "format": "ND",
69+ "paramType": "required",
70+ "shape": [
71+ -2
72+ ]
73+ },
74+ {
75+ "name": "value",
76+ "index": 2,
77+ "dtype": "float16",
78+ "format": "ND",
79+ "paramType": "optional",
80+ "shape": [
81+ -2
82+ ]
83+ }
84+ ],
85+ "outputs": [
86+ {
87+ "name": "y",
88+ "index": 0,
89+ "dtype": "float16",
90+ "format": "ND",
91+ "paramType": "required",
92+ "shape": [
93+ -2
94+ ]
95+ }
96+ ]
97+ },
98+ {
99+ "bin_filename": "ThresholdV2_cf23db81ef4f44c4902a242c92427474",
100+ "inputs": [
101+ {
102+ "name": "x",
103+ "index": 0,
104+ "dtype": "float32",
105+ "format": "ND",
106+ "paramType": "required",
107+ "shape": [
108+ -2
109+ ]
110+ },
111+ {
112+ "name": "threshold",
113+ "index": 1,
114+ "dtype": "float32",
115+ "format": "ND",
116+ "paramType": "required",
117+ "shape": [
118+ -2
119+ ]
120+ },
121+ {
122+ "name": "value",
123+ "index": 2,
124+ "dtype": "float32",
125+ "format": "ND",
126+ "paramType": "optional",
127+ "shape": [
128+ -2
129+ ]
130+ }
131+ ],
132+ "outputs": [
133+ {
134+ "name": "y",
135+ "index": 0,
136+ "dtype": "float32",
137+ "format": "ND",
138+ "paramType": "required",
139+ "shape": [
140+ -2
141+ ]
142+ }
143+ ]
144+ },
145+ {
146+ "bin_filename": "ThresholdV2_31b26d80653b487ea1aa4c5c12368acf",
147+ "inputs": [
148+ {
149+ "name": "x",
150+ "index": 0,
151+ "dtype": "int8",
152+ "format": "ND",
153+ "paramType": "required",
154+ "shape": [
155+ -2
156+ ]
157+ },
158+ {
159+ "name": "threshold",
160+ "index": 1,
161+ "dtype": "int8",
162+ "format": "ND",
163+ "paramType": "required",
164+ "shape": [
165+ -2
166+ ]
167+ },
168+ {
169+ "name": "value",
170+ "index": 2,
171+ "dtype": "int8",
172+ "format": "ND",
173+ "paramType": "optional",
174+ "shape": [
175+ -2
176+ ]
177+ }
178+ ],
179+ "outputs": [
180+ {
181+ "name": "y",
182+ "index": 0,
183+ "dtype": "int8",
184+ "format": "ND",
185+ "paramType": "required",
186+ "shape": [
187+ -2
188+ ]
189+ }
190+ ]
191+ },
192+ {
193+ "bin_filename": "ThresholdV2_7866d9f49c014447a554ec32b9054cef",
194+ "inputs": [
195+ {
196+ "name": "x",
197+ "index": 0,
198+ "dtype": "uint8",
199+ "format": "ND",
200+ "paramType": "required",
201+ "shape": [
202+ -2
203+ ]
204+ },
205+ {
206+ "name": "threshold",
207+ "index": 1,
208+ "dtype": "uint8",
209+ "format": "ND",
210+ "paramType": "required",
211+ "shape": [
212+ -2
213+ ]
214+ },
215+ {
216+ "name": "value",
217+ "index": 2,
218+ "dtype": "uint8",
219+ "format": "ND",
220+ "paramType": "optional",
221+ "shape": [
222+ -2
223+ ]
224+ }
225+ ],
226+ "outputs": [
227+ {
228+ "name": "y",
229+ "index": 0,
230+ "dtype": "uint8",
231+ "format": "ND",
232+ "paramType": "required",
233+ "shape": [
234+ -2
235+ ]
236+ }
237+ ]
238+ },
239+ {
240+ "bin_filename": "ThresholdV2_7c66b125a7064ca0b79f779a4e0fe2af",
241+ "inputs": [
242+ {
243+ "name": "x",
244+ "index": 0,
245+ "dtype": "int16",
246+ "format": "ND",
247+ "paramType": "required",
248+ "shape": [
249+ -2
250+ ]
251+ },
252+ {
253+ "name": "threshold",
254+ "index": 1,
255+ "dtype": "int16",
256+ "format": "ND",
257+ "paramType": "required",
258+ "shape": [
259+ -2
260+ ]
261+ },
262+ {
263+ "name": "value",
264+ "index": 2,
265+ "dtype": "int16",
266+ "format": "ND",
267+ "paramType": "optional",
268+ "shape": [
269+ -2
270+ ]
271+ }
272+ ],
273+ "outputs": [
274+ {
275+ "name": "y",
276+ "index": 0,
277+ "dtype": "int16",
278+ "format": "ND",
279+ "paramType": "required",
280+ "shape": [
281+ -2
282+ ]
283+ }
284+ ]
285+ },
286+ {
287+ "bin_filename": "ThresholdV2_3c66b177a7064ca0b79f779a4e0fe267",
288+ "inputs": [
289+ {
290+ "name": "x",
291+ "index": 0,
292+ "dtype": "int32",
293+ "format": "ND",
294+ "paramType": "required",
295+ "shape": [
296+ -2
297+ ]
298+ },
299+ {
300+ "name": "threshold",
301+ "index": 1,
302+ "dtype": "int32",
303+ "format": "ND",
304+ "paramType": "required",
305+ "shape": [
306+ -2
307+ ]
308+ },
309+ {
310+ "name": "value",
311+ "index": 2,
312+ "dtype": "int32",
313+ "format": "ND",
314+ "paramType": "optional",
315+ "shape": [
316+ -2
317+ ]
318+ }
319+ ],
320+ "outputs": [
321+ {
322+ "name": "y",
323+ "index": 0,
324+ "dtype": "int32",
325+ "format": "ND",
326+ "paramType": "required",
327+ "shape": [
328+ -2
329+ ]
330+ }
331+ ]
332+ },
333+ {
334+ "bin_filename": "ThresholdV2_97a7e1937ebe488b98e522dcfad25f4a",
335+ "inputs": [
336+ {
337+ "name": "x",
338+ "index": 0,
339+ "dtype": "int64",
340+ "format": "ND",
341+ "paramType": "required",
342+ "shape": [
343+ -2
344+ ]
345+ },
346+ {
347+ "name": "threshold",
348+ "index": 1,
349+ "dtype": "int64",
350+ "format": "ND",
351+ "paramType": "required",
352+ "shape": [
353+ -2
354+ ]
355+ },
356+ {
357+ "name": "value",
358+ "index": 2,
359+ "dtype": "int64",
360+ "format": "ND",
361+ "paramType": "optional",
362+ "shape": [
363+ -2
364+ ]
365+ }
366+ ],
367+ "outputs": [
368+ {
369+ "name": "y",
370+ "index": 0,
371+ "dtype": "int64",
372+ "format": "ND",
373+ "paramType": "required",
374+ "shape": [
375+ -2
376+ ]
377+ }
378+ ]
379+ }
380+ ]
381+ }
@@ -0,0 +1,381 @@
1+{
2+ "op_type": "ThresholdV2",
3+ "op_list": [
4+ {
5+ "bin_filename": "ThresholdV2_5771312ede1e42e5883dfb200d416cb0",
6+ "inputs": [
7+ {
8+ "name": "x",
9+ "index": 0,
10+ "dtype": "bfloat16",
11+ "format": "ND",
12+ "paramType": "required",
13+ "shape": [
14+ -2
15+ ]
16+ },
17+ {
18+ "name": "threshold",
19+ "index": 1,
20+ "dtype": "bfloat16",
21+ "format": "ND",
22+ "paramType": "required",
23+ "shape": [
24+ -2
25+ ]
26+ },
27+ {
28+ "name": "value",
29+ "index": 2,
30+ "dtype": "bfloat16",
31+ "format": "ND",
32+ "paramType": "optional",
33+ "shape": [
34+ -2
35+ ]
36+ }
37+ ],
38+ "outputs": [
39+ {
40+ "name": "y",
41+ "index": 0,
42+ "dtype": "bfloat16",
43+ "format": "ND",
44+ "paramType": "required",
45+ "shape": [
46+ -2
47+ ]
48+ }
49+ ]
50+ },
51+ {
52+ "bin_filename": "ThresholdV2_eea8ce60afe94bd4814c401e58047393",
53+ "inputs": [
54+ {
55+ "name": "x",
56+ "index": 0,
57+ "dtype": "float16",
58+ "format": "ND",
59+ "paramType": "required",
60+ "shape": [
61+ -2
62+ ]
63+ },
64+ {
65+ "name": "threshold",
66+ "index": 1,
67+ "dtype": "float16",
68+ "format": "ND",
69+ "paramType": "required",
70+ "shape": [
71+ -2
72+ ]
73+ },
74+ {
75+ "name": "value",
76+ "index": 2,
77+ "dtype": "float16",
78+ "format": "ND",
79+ "paramType": "optional",
80+ "shape": [
81+ -2
82+ ]
83+ }
84+ ],
85+ "outputs": [
86+ {
87+ "name": "y",
88+ "index": 0,
89+ "dtype": "float16",
90+ "format": "ND",
91+ "paramType": "required",
92+ "shape": [
93+ -2
94+ ]
95+ }
96+ ]
97+ },
98+ {
99+ "bin_filename": "ThresholdV2_cf23db81ef4f44c4902a242c92427474",
100+ "inputs": [
101+ {
102+ "name": "x",
103+ "index": 0,
104+ "dtype": "float32",
105+ "format": "ND",
106+ "paramType": "required",
107+ "shape": [
108+ -2
109+ ]
110+ },
111+ {
112+ "name": "threshold",
113+ "index": 1,
114+ "dtype": "float32",
115+ "format": "ND",
116+ "paramType": "required",
117+ "shape": [
118+ -2
119+ ]
120+ },
121+ {
122+ "name": "value",
123+ "index": 2,
124+ "dtype": "float32",
125+ "format": "ND",
126+ "paramType": "optional",
127+ "shape": [
128+ -2
129+ ]
130+ }
131+ ],
132+ "outputs": [
133+ {
134+ "name": "y",
135+ "index": 0,
136+ "dtype": "float32",
137+ "format": "ND",
138+ "paramType": "required",
139+ "shape": [
140+ -2
141+ ]
142+ }
143+ ]
144+ },
145+ {
146+ "bin_filename": "ThresholdV2_31b26d80653b487ea1aa4c5c12368acf",
147+ "inputs": [
148+ {
149+ "name": "x",
150+ "index": 0,
151+ "dtype": "int8",
152+ "format": "ND",
153+ "paramType": "required",
154+ "shape": [
155+ -2
156+ ]
157+ },
158+ {
159+ "name": "threshold",
160+ "index": 1,
161+ "dtype": "int8",
162+ "format": "ND",
163+ "paramType": "required",
164+ "shape": [
165+ -2
166+ ]
167+ },
168+ {
169+ "name": "value",
170+ "index": 2,
171+ "dtype": "int8",
172+ "format": "ND",
173+ "paramType": "optional",
174+ "shape": [
175+ -2
176+ ]
177+ }
178+ ],
179+ "outputs": [
180+ {
181+ "name": "y",
182+ "index": 0,
183+ "dtype": "int8",
184+ "format": "ND",
185+ "paramType": "required",
186+ "shape": [
187+ -2
188+ ]
189+ }
190+ ]
191+ },
192+ {
193+ "bin_filename": "ThresholdV2_7866d9f49c014447a554ec32b9054cef",
194+ "inputs": [
195+ {
196+ "name": "x",
197+ "index": 0,
198+ "dtype": "uint8",
199+ "format": "ND",
200+ "paramType": "required",
201+ "shape": [
202+ -2
203+ ]
204+ },
205+ {
206+ "name": "threshold",
207+ "index": 1,
208+ "dtype": "uint8",
209+ "format": "ND",
210+ "paramType": "required",
211+ "shape": [
212+ -2
213+ ]
214+ },
215+ {
216+ "name": "value",
217+ "index": 2,
218+ "dtype": "uint8",
219+ "format": "ND",
220+ "paramType": "optional",
221+ "shape": [
222+ -2
223+ ]
224+ }
225+ ],
226+ "outputs": [
227+ {
228+ "name": "y",
229+ "index": 0,
230+ "dtype": "uint8",
231+ "format": "ND",
232+ "paramType": "required",
233+ "shape": [
234+ -2
235+ ]
236+ }
237+ ]
238+ },
239+ {
240+ "bin_filename": "ThresholdV2_7c66b125a7064ca0b79f779a4e0fe2af",
241+ "inputs": [
242+ {
243+ "name": "x",
244+ "index": 0,
245+ "dtype": "int16",
246+ "format": "ND",
247+ "paramType": "required",
248+ "shape": [
249+ -2
250+ ]
251+ },
252+ {
253+ "name": "threshold",
254+ "index": 1,
255+ "dtype": "int16",
256+ "format": "ND",
257+ "paramType": "required",
258+ "shape": [
259+ -2
260+ ]
261+ },
262+ {
263+ "name": "value",
264+ "index": 2,
265+ "dtype": "int16",
266+ "format": "ND",
267+ "paramType": "optional",
268+ "shape": [
269+ -2
270+ ]
271+ }
272+ ],
273+ "outputs": [
274+ {
275+ "name": "y",
276+ "index": 0,
277+ "dtype": "int16",
278+ "format": "ND",
279+ "paramType": "required",
280+ "shape": [
281+ -2
282+ ]
283+ }
284+ ]
285+ },
286+ {
287+ "bin_filename": "ThresholdV2_3c66b177a7064ca0b79f779a4e0fe267",
288+ "inputs": [
289+ {
290+ "name": "x",
291+ "index": 0,
292+ "dtype": "int32",
293+ "format": "ND",
294+ "paramType": "required",
295+ "shape": [
296+ -2
297+ ]
298+ },
299+ {
300+ "name": "threshold",
301+ "index": 1,
302+ "dtype": "int32",
303+ "format": "ND",
304+ "paramType": "required",
305+ "shape": [
306+ -2
307+ ]
308+ },
309+ {
310+ "name": "value",
311+ "index": 2,
312+ "dtype": "int32",
313+ "format": "ND",
314+ "paramType": "optional",
315+ "shape": [
316+ -2
317+ ]
318+ }
319+ ],
320+ "outputs": [
321+ {
322+ "name": "y",
323+ "index": 0,
324+ "dtype": "int32",
325+ "format": "ND",
326+ "paramType": "required",
327+ "shape": [
328+ -2
329+ ]
330+ }
331+ ]
332+ },
333+ {
334+ "bin_filename": "ThresholdV2_97a7e1937ebe488b98e522dcfad25f4a",
335+ "inputs": [
336+ {
337+ "name": "x",
338+ "index": 0,
339+ "dtype": "int64",
340+ "format": "ND",
341+ "paramType": "required",
342+ "shape": [
343+ -2
344+ ]
345+ },
346+ {
347+ "name": "threshold",
348+ "index": 1,
349+ "dtype": "int64",
350+ "format": "ND",
351+ "paramType": "required",
352+ "shape": [
353+ -2
354+ ]
355+ },
356+ {
357+ "name": "value",
358+ "index": 2,
359+ "dtype": "int64",
360+ "format": "ND",
361+ "paramType": "optional",
362+ "shape": [
363+ -2
364+ ]
365+ }
366+ ],
367+ "outputs": [
368+ {
369+ "name": "y",
370+ "index": 0,
371+ "dtype": "int64",
372+ "format": "ND",
373+ "paramType": "required",
374+ "shape": [
375+ -2
376+ ]
377+ }
378+ ]
379+ }
380+ ]
381+ }
@@ -34,8 +34,11 @@ public:
34 .NeedCheckSupportFlag(false)34 .NeedCheckSupportFlag(false)
35 .PrecisionReduceFlag(true);35 .PrecisionReduceFlag(true);
36 this->AICore().AddConfig("ascend950", aicore_config);36 this->AICore().AddConfig("ascend950", aicore_config);
37+ this->AICore().AddConfig("ascend350", aicore_config);
38+ this->AICore().AddConfig("ascend960pr", aicore_config);
39+ this->AICore().AddConfig("ascend960dt", aicore_config);
37 }40 }
38};41};
39 42 
40OP_ADD(ThresholdV2);43OP_ADD(ThresholdV2);
41-} // namespace ops44+} // namespace ops
@@ -10,7 +10,7 @@
10 10 
11add_kernel_sources(11add_kernel_sources(
12 KERNEL_SRC arch35/threshold_v2.cpp12 KERNEL_SRC arch35/threshold_v2.cpp
13- COMPUTE_UNITS ascend95013+ COMPUTE_UNITS ascend950 ascend350 ascend960pr ascend960dt
14 IMPL_MODE high_performance,high_precision14 IMPL_MODE high_performance,high_precision
15 AUTO_SYNC false15 AUTO_SYNC false
16-)16+)
@@ -9,7 +9,7 @@
9# ----------------------------------------------------------------------------9# ----------------------------------------------------------------------------
10 10 
11# 设置算子定义时支持的芯片类型11# 设置算子定义时支持的芯片类型
12-set(SUPPORT_COMPUTE_UNIT "ascend950" "ascend350")12+set(SUPPORT_COMPUTE_UNIT "ascend950" "ascend350" "ascend960pr" "ascend960dt")
13# 设置每种芯片类型对应的tiling文件目录,即采用op_host目录下哪个文件夹下的tiling文件编译13# 设置每种芯片类型对应的tiling文件目录,即采用op_host目录下哪个文件夹下的tiling文件编译
14-set(SUPPORT_TILING_DIR "arch35" "arch35")14+set(SUPPORT_TILING_DIR "arch35" "arch35" "arch35" "arch35")
15add_modules_sources(HOSTNAME ${OPHOST_NAME} MODE PRIVATE DIR ${CMAKE_CURRENT_SOURCE_DIR} OPTYPE concat_offset ACLNNTYPE aclnn_exclude COMPUTE_UNIT ${SUPPORT_COMPUTE_UNIT} TILING_DIR ${SUPPORT_TILING_DIR} DISABLE_IN_OPP TRUE)15add_modules_sources(HOSTNAME ${OPHOST_NAME} MODE PRIVATE DIR ${CMAKE_CURRENT_SOURCE_DIR} OPTYPE concat_offset ACLNNTYPE aclnn_exclude COMPUTE_UNIT ${SUPPORT_COMPUTE_UNIT} TILING_DIR ${SUPPORT_TILING_DIR} DISABLE_IN_OPP TRUE)
@@ -47,6 +47,8 @@ public:
47 .ExtendCfgInfo("opFile.value", "concat_offset_apt");47 .ExtendCfgInfo("opFile.value", "concat_offset_apt");
48 this->AICore().AddConfig("ascend950", aicoreConfig);48 this->AICore().AddConfig("ascend950", aicoreConfig);
49 this->AICore().AddConfig("ascend350", aicoreConfig);49 this->AICore().AddConfig("ascend350", aicoreConfig);
50+ this->AICore().AddConfig("ascend960pr", aicoreConfig);
51+ this->AICore().AddConfig("ascend960dt", aicoreConfig);
50 }52 }
51};53};
52 54 
@@ -0,0 +1,55 @@
1+{
2+ "op_type": "ConcatOffset",
3+ "op_list": [
4+ {
5+ "bin_filename": "ConcatOffset_int32_bin",
6+ "inputs": [
7+ {
8+ "name": "concat_dim",
9+ "index": 0,
10+ "dtype": "int32",
11+ "format": "ND",
12+ "paramType": "required",
13+ "shape": [
14+ -2
15+ ]
16+ },
17+ [
18+ {
19+ "name": "x",
20+ "index": 1,
21+ "dtype": "int32",
22+ "format": "ND",
23+ "paramType": "dynamic",
24+ "shape": [
25+ -2
26+ ],
27+ "format_match_mode": "FormatAgnostic"
28+ }
29+ ]
30+ ],
31+ "outputs": [
32+ [
33+ {
34+ "name": "y",
35+ "index": 0,
36+ "dtype": "int32",
37+ "format": "ND",
38+ "paramType": "dynamic",
39+ "shape": [
40+ -2
41+ ],
42+ "format_match_mode": "FormatAgnostic"
43+ }
44+ ]
45+ ],
46+ "attrs": [
47+ {
48+ "name": "N",
49+ "dtype": "int",
50+ "value": null
51+ }
52+ ]
53+ }
54+ ]
55+}
@@ -0,0 +1,55 @@
1+{
2+ "op_type": "ConcatOffset",
3+ "op_list": [
4+ {
5+ "bin_filename": "ConcatOffset_int32_bin",
6+ "inputs": [
7+ {
8+ "name": "concat_dim",
9+ "index": 0,
10+ "dtype": "int32",
11+ "format": "ND",
12+ "paramType": "required",
13+ "shape": [
14+ -2
15+ ]
16+ },
17+ [
18+ {
19+ "name": "x",
20+ "index": 1,
21+ "dtype": "int32",
22+ "format": "ND",
23+ "paramType": "dynamic",
24+ "shape": [
25+ -2
26+ ],
27+ "format_match_mode": "FormatAgnostic"
28+ }
29+ ]
30+ ],
31+ "outputs": [
32+ [
33+ {
34+ "name": "y",
35+ "index": 0,
36+ "dtype": "int32",
37+ "format": "ND",
38+ "paramType": "dynamic",
39+ "shape": [
40+ -2
41+ ],
42+ "format_match_mode": "FormatAgnostic"
43+ }
44+ ]
45+ ],
46+ "attrs": [
47+ {
48+ "name": "N",
49+ "dtype": "int",
50+ "value": null
51+ }
52+ ]
53+ }
54+ ]
55+}
@@ -0,0 +1,16 @@
1+# ----------------------------------------------------------------------------
2+# Copyright (c) 2026 Huawei Technologies Co., Ltd.
3+# This program is free software, you can redistribute it and/or modify it under the terms and conditions of
4+# CANN Open Software License Agreement Version 2.0 (the "License").
5+# Please refer to the License for details. You may not use this file except in compliance with the License.
6+# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
7+# INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8+# See LICENSE in the root of the software repository for the full text of the License.
9+# ----------------------------------------------------------------------------
10+ 
11+add_kernel_sources(
12+ KERNEL_SRC concat_offset_apt.cpp
13+ COMPUTE_UNITS ascend950 ascend350 ascend960pr ascend960dt
14+ AUTO_SYNC false
15+ OPTIONS "--cce-no-dcache-flush"
16+)