@@ -60,6 +60,8 @@ static void __attribute__ ((always_inline)) dotprod2D_hwc_v (
6060 in_row_step -= width * in_col_step;
6161 kern_row_step -= width * kern_col_step;
6262
63+ #pragma clang diagnostic push
64+ #pragma clang diagnostic ignored "-Wpass-failed"
6365#pragma clang loop unroll(full)
6466 for (int32_t row = 0 ; row < height; row++) {
6567#pragma clang loop unroll(full)
@@ -73,6 +75,7 @@ static void __attribute__ ((always_inline)) dotprod2D_hwc_v (
7375 in += in_row_step;
7476 krn += kern_row_step;
7577 }
78+ #pragma clang diagnostic pop
7679}
7780
7881// The function uses pointers to pointers for in and krn.
@@ -91,7 +94,8 @@ static void __attribute__ ((always_inline)) dotprod2D_hwc_d (
9194 int kern_row_step) {
9295 in_row_step -= width * in_col_step;
9396 kern_row_step -= width * kern_col_step;
94-
97+ #pragma clang diagnostic push
98+ #pragma clang diagnostic ignored "-Wpass-failed"
9599#pragma clang loop unroll(full)
96100 for (int32_t row = 0 ; row < height; row++) {
97101#pragma clang loop unroll(full)
@@ -103,6 +107,7 @@ static void __attribute__ ((always_inline)) dotprod2D_hwc_d (
103107 *in += in_row_step;
104108 *krn += kern_row_step;
105109 }
110+ #pragma clang diagnostic pop
106111}
107112
108113// The function uses pointers to pointers for in and krn.
@@ -122,6 +127,8 @@ static void __attribute__ ((always_inline)) dotprod2D_hwc_v (
122127
123128 in_row_step -= width * in_col_step;
124129 kern_row_step -= width * kern_col_step;
130+ #pragma clang diagnostic push
131+ #pragma clang diagnostic ignored "-Wpass-failed"
125132#pragma clang loop unroll(full)
126133 for (int32_t row = 0 ; row < height; row++) {
127134#pragma clang loop unroll(full)
@@ -135,6 +142,7 @@ static void __attribute__ ((always_inline)) dotprod2D_hwc_v (
135142 *in += in_row_step;
136143 *krn += kern_row_step;
137144 }
145+ #pragma clang diagnostic pop
138146}
139147
140148// The function uses pointers to pointers for in and krn.
@@ -154,6 +162,8 @@ static acc_T __attribute__ ((always_inline)) dotprod2D_inp_width_v(
154162 int in_width_step) {
155163 in_row_step -= width * in_col_step;
156164 kern_row_step -= width * kern_col_step;
165+ #pragma clang diagnostic push
166+ #pragma clang diagnostic ignored "-Wpass-failed"
157167#pragma clang loop unroll(full)
158168 for (int row = 0 ; row < height; row++) {
159169#pragma clang loop unroll(full)
@@ -168,6 +178,7 @@ static acc_T __attribute__ ((always_inline)) dotprod2D_inp_width_v(
168178 *inp += in_row_step;
169179 *krn += kern_row_step;
170180 }
181+ #pragma clang diagnostic pop
171182 return *accu;
172183}
173184
@@ -212,7 +223,8 @@ static void __attribute__ ((always_inline)) dotprod2D_hwc_d (
212223 int kern_row_step) {
213224 in_row_step -= width * in_col_step;
214225 kern_row_step -= width * kern_col_step;
215-
226+ #pragma clang diagnostic push
227+ #pragma clang diagnostic ignored "-Wpass-failed"
216228#pragma clang loop unroll(full)
217229 for (int32_t row = 0 ; row < height; row++) {
218230#pragma clang loop unroll(full)
@@ -224,6 +236,7 @@ static void __attribute__ ((always_inline)) dotprod2D_hwc_d (
224236 in += in_row_step;
225237 krn += kern_row_step;
226238 }
239+ #pragma clang diagnostic pop
227240}
228241
229242template < typename in_T, typename w_T, typename acc_T >
@@ -248,6 +261,8 @@ static inline void __attribute__ ((always_inline)) dotprod2D (
248261 in_row_step -= width;
249262 kern_row_step -= width;
250263 __builtin_assume (height > 0 );
264+ #pragma clang diagnostic push
265+ #pragma clang diagnostic ignored "-Wpass-failed"
251266#pragma clang loop unroll(full)
252267 for (int row = 0 ; row < height; row++) {
253268#pragma clang loop unroll(full)
@@ -257,6 +272,7 @@ static inline void __attribute__ ((always_inline)) dotprod2D (
257272 in += in_row_step;
258273 krn += kern_row_step;
259274 }
275+ #pragma clang diagnostic pop
260276}
261277
262278template < typename in_T, typename w_T, typename acc_T >
@@ -272,6 +288,8 @@ static inline void __attribute__ ((always_inline)) dotprod2D_unroll2 (
272288
273289 in_row_step -= width;
274290 kern_row_step -= width;
291+ #pragma clang diagnostic push
292+ #pragma clang diagnostic ignored "-Wpass-failed"
275293#pragma clang loop unroll(full)
276294 for (int row = 0 ; row < height; row++) {
277295 __builtin_assume (width % 2 == 0 );
@@ -285,6 +303,7 @@ static inline void __attribute__ ((always_inline)) dotprod2D_unroll2 (
285303 in += in_row_step;
286304 krn += kern_row_step;
287305 }
306+ #pragma clang diagnostic pop
288307}
289308
290309template <typename in_T, typename w_T, typename acc_T>
@@ -298,6 +317,8 @@ static inline void __attribute__((always_inline)) dotprod2D_odd(
298317 acc_T *accu) {
299318 in_row_step -= width;
300319 kern_row_step -= width;
320+ #pragma clang diagnostic push
321+ #pragma clang diagnostic ignored "-Wpass-failed"
301322#pragma clang loop unroll(full)
302323 for (int row = 0 ; row < height; row++) {
303324#pragma clang loop unroll(full)
@@ -309,6 +330,7 @@ static inline void __attribute__((always_inline)) dotprod2D_odd(
309330 in += in_row_step;
310331 krn += kern_row_step;
311332 }
333+ #pragma clang diagnostic pop
312334}
313335template < typename in_T, typename w_T, typename acc_T >
314336static inline void __attribute__ ((always_inline)) dotprod2D_unroll4 (
@@ -330,6 +352,8 @@ static inline void __attribute__ ((always_inline)) dotprod2D_unroll4 (
330352 * unroll of 4 the dmac is not directly after the corresponding load
331353 * which reduces the stalls.
332354 */
355+ #pragma clang diagnostic push
356+ #pragma clang diagnostic ignored "-Wpass-failed"
333357#pragma clang loop unroll(full)
334358 for (int clmn = 0 ; clmn < width / 4 ; clmn++) {
335359 mli_prv_load_mac_vec4 (accu, in, krn);
@@ -339,6 +363,7 @@ static inline void __attribute__ ((always_inline)) dotprod2D_unroll4 (
339363 in += in_row_step;
340364 krn += kern_row_step;
341365 }
366+ #pragma clang diagnostic pop
342367}
343368
344369template < typename in_T, typename w_T, typename acc_T >
@@ -354,6 +379,8 @@ static inline void __attribute__ ((always_inline)) dotprod2D_mac4 (
354379
355380 in_row_step -= width;
356381 kern_row_step -= width;
382+ #pragma clang diagnostic push
383+ #pragma clang diagnostic ignored "-Wpass-failed"
357384#pragma clang loop unroll(full)
358385 for (int row = 0 ; row < height; row++) {
359386 __builtin_assume (width % 4 == 0 );
@@ -366,6 +393,7 @@ static inline void __attribute__ ((always_inline)) dotprod2D_mac4 (
366393 in += in_row_step;
367394 krn += kern_row_step;
368395 }
396+ #pragma clang diagnostic pop
369397}
370398template < typename in_T, typename w_T, typename acc_T >
371399static inline void __attribute__ ((always_inline)) dotprod2D_unroll4_plus1 (
@@ -381,6 +409,8 @@ static inline void __attribute__ ((always_inline)) dotprod2D_unroll4_plus1 (
381409 in_row_step -= width;
382410 kern_row_step -= width;
383411 __builtin_assume (height > 0 );
412+ #pragma clang diagnostic push
413+ #pragma clang diagnostic ignored "-Wpass-failed"
384414#pragma clang loop unroll(full)
385415 for (int row = 0 ; row < height; row++) {
386416 /* unroll of 2 enables the use of dmac
@@ -399,6 +429,7 @@ static inline void __attribute__ ((always_inline)) dotprod2D_unroll4_plus1 (
399429 in += in_row_step;
400430 krn += kern_row_step;
401431 }
432+ #pragma clang diagnostic pop
402433}
403434
404435template < typename in_T, typename w_T, typename acc_T >
@@ -415,6 +446,8 @@ static inline void __attribute__ ((always_inline)) dotprod2D_unroll4_plus2 (
415446 in_row_step -= width;
416447 kern_row_step -= width;
417448 __builtin_assume (height > 0 );
449+ #pragma clang diagnostic push
450+ #pragma clang diagnostic ignored "-Wpass-failed"
418451#pragma clang loop unroll(full)
419452 for (int row = 0 ; row < height; row++) {
420453 __builtin_assume (width % 2 == 0 );
@@ -434,6 +467,7 @@ static inline void __attribute__ ((always_inline)) dotprod2D_unroll4_plus2 (
434467 in += in_row_step;
435468 krn += kern_row_step;
436469 }
470+ #pragma clang diagnostic pop
437471}
438472
439473template < typename in_T, typename w_T, typename acc_T >
@@ -450,6 +484,8 @@ static inline void __attribute__ ((always_inline)) dotprod2D_unroll4_plus3 (
450484 in_row_step -= width;
451485 kern_row_step -= width;
452486 __builtin_assume (height > 0 );
487+ #pragma clang diagnostic push
488+ #pragma clang diagnostic ignored "-Wpass-failed"
453489#pragma clang loop unroll(full)
454490 for (int row = 0 ; row < height; row++) {
455491 /* unroll of 2 enables the use of dmac
@@ -471,6 +507,7 @@ static inline void __attribute__ ((always_inline)) dotprod2D_unroll4_plus3 (
471507 in += in_row_step;
472508 krn += kern_row_step;
473509 }
510+ #pragma clang diagnostic pop
474511}
475512
476513template < typename in_T, typename w_T, typename acc_T > static inline void
@@ -532,7 +569,8 @@ dotprod2D_v_simple (
532569 acc_T * accu) {
533570 in_row_step -= width;
534571 kern_row_step -= width;
535-
572+ #pragma clang diagnostic push
573+ #pragma clang diagnostic ignored "-Wpass-failed"
536574#pragma clang loop unroll(full)
537575 for (int32_t row = 0 ; row < height; row++) {
538576#pragma clang loop unroll(full)
@@ -546,6 +584,7 @@ dotprod2D_v_simple (
546584 in += in_row_step;
547585 krn += kern_row_step;
548586 }
587+ #pragma clang diagnostic pop
549588}
550589
551590template < typename in_T, typename w_T, typename acc_T > static inline void
@@ -568,6 +607,8 @@ dotprod3D_v_simple (
568607 __builtin_assume (in_ch > 0 );
569608 __builtin_assume (height > 1 );
570609 for (int in_ch_idx = 0 ; in_ch_idx < in_ch; in_ch_idx++) {
610+ #pragma clang diagnostic push
611+ #pragma clang diagnostic ignored "-Wpass-failed"
571612#pragma clang loop unroll(full)
572613 for (int row = 0 ; row < height-1 ; row++) {
573614#pragma clang loop unroll(full)
@@ -595,6 +636,7 @@ dotprod3D_v_simple (
595636 in += in_ch_step;
596637 krn += kern_ch_step;
597638 }
639+ #pragma clang diagnostic pop
598640}
599641
600642
@@ -612,6 +654,8 @@ static acc_T __attribute__ ((always_inline)) dotprod2D_inp_width_v(
612654 int in_width_step) {
613655 in_row_step -= width * in_col_step;
614656 kern_row_step -= width * kern_col_step;
657+ #pragma clang diagnostic push
658+ #pragma clang diagnostic ignored "-Wpass-failed"
615659#pragma clang loop unroll(full)
616660 for (int row = 0 ; row < height; row++) {
617661#pragma clang loop unroll(full)
@@ -626,6 +670,7 @@ static acc_T __attribute__ ((always_inline)) dotprod2D_inp_width_v(
626670 inp += in_row_step;
627671 krn += kern_row_step;
628672 }
673+ #pragma clang diagnostic pop
629674 return *accu;
630675}
631676
@@ -649,6 +694,8 @@ static inline void __attribute__ ((always_inline)) dotprod2D_v_odd_even (
649694#else
650695 kern_row_step -= (width + 1 );
651696#endif
697+ #pragma clang diagnostic push
698+ #pragma clang diagnostic ignored "-Wpass-failed"
652699#pragma clang loop unroll(full)
653700 for (int row = 0 ; row < height; row++) {
654701#ifdef K_ODD
@@ -707,6 +754,7 @@ static inline void __attribute__ ((always_inline)) dotprod2D_v_odd_even (
707754 in += in_row_step;
708755 krn += kern_row_step;
709756 }
757+ #pragma clang diagnostic pop
710758}
711759
712760template < typename in_T, typename w_T, typename acc_T >
0 commit comments