12
12
// CONDITIONS OF ANY KIND, either express or implied. See the License for the
13
13
// specific language governing permissions and limitations under the License.
14
14
15
- #if !(__AVX512VNNI__ || __AVXVNNI__ || __AVX2__ || __XOP__ )
16
15
#if NCNN_RUNTIME_CPU && NCNN_AVX512VNNI && __AVX512F__ && !__AVX512VNNI__
17
16
void conv3x3s1_winograd23_int8_avx512vnni (const Mat & bottom_blob , Mat & top_blob , const Mat & AT , int nT , const Option & opt );
18
17
void conv3x3s1_winograd43_int8_avx512vnni (const Mat & bottom_blob , Mat & top_blob , const Mat & AT , int nT , const Option & opt );
19
18
#endif
20
19
21
- #if NCNN_RUNTIME_CPU && NCNN_AVXVNNI && __AVX2__ && !__AVXVNNI__
20
+ #if NCNN_RUNTIME_CPU && NCNN_AVXVNNI && __AVX2__ && !__AVXVNNI__ && ! __AVX512VNNI__
22
21
void conv3x3s1_winograd23_int8_avxvnni (const Mat & bottom_blob , Mat & top_blob , const Mat & AT , int nT , const Option & opt );
23
22
void conv3x3s1_winograd43_int8_avxvnni (const Mat & bottom_blob , Mat & top_blob , const Mat & AT , int nT , const Option & opt );
24
23
#endif
25
24
26
- #if NCNN_RUNTIME_CPU && NCNN_AVX2 && __AVX__ && !__AVX2__
25
+ #if NCNN_RUNTIME_CPU && NCNN_AVX2 && __AVX__ && !__AVX2__ && ! __AVXVNNI__ && ! __AVX512VNNI__
27
26
void conv3x3s1_winograd23_transform_kernel_int8_avx2 (const Mat & kernel , Mat & AT , int inch , int outch , const Option & opt );
28
27
void conv3x3s1_winograd23_int8_avx2 (const Mat & bottom_blob , Mat & top_blob , const Mat & AT , int nT , const Option & opt );
29
28
void conv3x3s1_winograd43_transform_kernel_int8_avx2 (const Mat & kernel , Mat & AT , int inch , int outch , const Option & opt );
30
29
void conv3x3s1_winograd43_int8_avx2 (const Mat & bottom_blob , Mat & top_blob , const Mat & AT , int nT , const Option & opt );
31
30
#endif
32
31
33
- #if NCNN_RUNTIME_CPU && NCNN_XOP && __SSE2__ && !__XOP__
32
+ #if NCNN_RUNTIME_CPU && NCNN_XOP && __SSE2__ && !__XOP__ && ! __AVX2__ && ! __AVXVNNI__ && ! __AVX512VNNI__
34
33
void conv3x3s1_winograd23_int8_xop (const Mat & bottom_blob , Mat & top_blob , const Mat & AT , int nT , const Option & opt );
35
34
void conv3x3s1_winograd43_int8_xop (const Mat & bottom_blob , Mat & top_blob , const Mat & AT , int nT , const Option & opt );
36
35
#endif
37
- #endif
38
36
39
37
static void pack_A_tile_int8 (const Mat & A , Mat & AT , int batch , int max_ii , int max_kk )
40
38
{
@@ -3430,14 +3428,12 @@ static inline void conv3x3s1_winograd23_transform_kernel_tile_int8(const Mat& ke
3430
3428
3431
3429
static void conv3x3s1_winograd23_transform_kernel_int8 (const Mat & kernel , Mat & AT , int inch , int outch , const Option & opt )
3432
3430
{
3433
- #if !(__AVX512VNNI__ || __AVXVNNI__ || __AVX2__ || __XOP__ )
3434
- #if NCNN_RUNTIME_CPU && NCNN_AVX2 && __AVX__ && !__AVX2__
3431
+ #if NCNN_RUNTIME_CPU && NCNN_AVX2 && __AVX__ && !__AVX2__ && !__AVXVNNI__ && !__AVX512VNNI__
3435
3432
if (ncnn ::cpu_support_x86_avx2 ())
3436
3433
{
3437
3434
conv3x3s1_winograd23_transform_kernel_int8_avx2 (kernel , AT , inch , outch , opt );
3438
3435
return ;
3439
3436
}
3440
- #endif
3441
3437
#endif
3442
3438
3443
3439
const int M = outch ;
@@ -4430,7 +4426,6 @@ static inline void conv3x3s1_winograd23_transform_output_tile_int8(const Mat& to
4430
4426
4431
4427
static void conv3x3s1_winograd23_int8 (const Mat & bottom_blob , Mat & top_blob , const Mat & AT , int nT , const Option & opt )
4432
4428
{
4433
- #if !(__AVX512VNNI__ || __AVXVNNI__ || __AVX2__ || __XOP__ )
4434
4429
#if NCNN_RUNTIME_CPU && NCNN_AVX512VNNI && __AVX512F__ && !__AVX512VNNI__
4435
4430
if (ncnn ::cpu_support_x86_avx512_vnni ())
4436
4431
{
@@ -4439,29 +4434,28 @@ static void conv3x3s1_winograd23_int8(const Mat& bottom_blob, Mat& top_blob, con
4439
4434
}
4440
4435
#endif
4441
4436
4442
- #if NCNN_RUNTIME_CPU && NCNN_AVXVNNI && __AVX2__ && !__AVXVNNI__
4437
+ #if NCNN_RUNTIME_CPU && NCNN_AVXVNNI && __AVX2__ && !__AVXVNNI__ && ! __AVX512VNNI__
4443
4438
if (ncnn ::cpu_support_x86_avx_vnni ())
4444
4439
{
4445
4440
conv3x3s1_winograd23_int8_avxvnni (bottom_blob , top_blob , AT , nT , opt );
4446
4441
return ;
4447
4442
}
4448
4443
#endif
4449
4444
4450
- #if NCNN_RUNTIME_CPU && NCNN_AVX2 && __AVX__ && !__AVX2__
4445
+ #if NCNN_RUNTIME_CPU && NCNN_AVX2 && __AVX__ && !__AVX2__ && ! __AVXVNNI__ && ! __AVX512VNNI__
4451
4446
if (ncnn ::cpu_support_x86_avx2 ())
4452
4447
{
4453
4448
conv3x3s1_winograd23_int8_avx2 (bottom_blob , top_blob , AT , nT , opt );
4454
4449
return ;
4455
4450
}
4456
4451
#endif
4457
4452
4458
- #if NCNN_RUNTIME_CPU && NCNN_XOP && __SSE2__ && !__XOP__
4453
+ #if NCNN_RUNTIME_CPU && NCNN_XOP && __SSE2__ && !__XOP__ && ! __AVX2__ && ! __AVXVNNI__ && ! __AVX512VNNI__
4459
4454
if (ncnn ::cpu_support_x86_xop ())
4460
4455
{
4461
4456
conv3x3s1_winograd23_int8_xop (bottom_blob , top_blob , AT , nT , opt );
4462
4457
return ;
4463
4458
}
4464
- #endif
4465
4459
#endif
4466
4460
4467
4461
int outw = top_blob .w ;
@@ -4642,14 +4636,12 @@ static inline void conv3x3s1_winograd43_transform_kernel_tile_int8(const Mat& ke
4642
4636
4643
4637
static void conv3x3s1_winograd43_transform_kernel_int8 (const Mat & kernel , Mat & AT , int inch , int outch , const Option & opt )
4644
4638
{
4645
- #if !(__AVX512VNNI__ || __AVXVNNI__ || __AVX2__ || __XOP__ )
4646
- #if NCNN_RUNTIME_CPU && NCNN_AVX2 && __AVX__ && !__AVX2__
4639
+ #if NCNN_RUNTIME_CPU && NCNN_AVX2 && __AVX__ && !__AVX2__ && !__AVXVNNI__ && !__AVX512VNNI__
4647
4640
if (ncnn ::cpu_support_x86_avx2 ())
4648
4641
{
4649
4642
conv3x3s1_winograd43_transform_kernel_int8_avx2 (kernel , AT , inch , outch , opt );
4650
4643
return ;
4651
4644
}
4652
- #endif
4653
4645
#endif
4654
4646
4655
4647
const int M = outch ;
@@ -6260,7 +6252,6 @@ static inline void conv3x3s1_winograd43_transform_output_tile_int8(const Mat& to
6260
6252
6261
6253
static void conv3x3s1_winograd43_int8 (const Mat & bottom_blob , Mat & top_blob , const Mat & AT , int nT , const Option & opt )
6262
6254
{
6263
- #if !(__AVX512VNNI__ || __AVXVNNI__ || __AVX2__ || __XOP__ )
6264
6255
#if NCNN_RUNTIME_CPU && NCNN_AVX512VNNI && __AVX512F__ && !__AVX512VNNI__
6265
6256
if (ncnn ::cpu_support_x86_avx512_vnni ())
6266
6257
{
@@ -6269,29 +6260,28 @@ static void conv3x3s1_winograd43_int8(const Mat& bottom_blob, Mat& top_blob, con
6269
6260
}
6270
6261
#endif
6271
6262
6272
- #if NCNN_RUNTIME_CPU && NCNN_AVXVNNI && __AVX2__ && !__AVXVNNI__
6263
+ #if NCNN_RUNTIME_CPU && NCNN_AVXVNNI && __AVX2__ && !__AVXVNNI__ && ! __AVX512VNNI__
6273
6264
if (ncnn ::cpu_support_x86_avx_vnni ())
6274
6265
{
6275
6266
conv3x3s1_winograd43_int8_avxvnni (bottom_blob , top_blob , AT , nT , opt );
6276
6267
return ;
6277
6268
}
6278
6269
#endif
6279
6270
6280
- #if NCNN_RUNTIME_CPU && NCNN_AVX2 && __AVX__ && !__AVX2__
6271
+ #if NCNN_RUNTIME_CPU && NCNN_AVX2 && __AVX__ && !__AVX2__ && ! __AVXVNNI__ && ! __AVX512VNNI__
6281
6272
if (ncnn ::cpu_support_x86_avx2 ())
6282
6273
{
6283
6274
conv3x3s1_winograd43_int8_avx2 (bottom_blob , top_blob , AT , nT , opt );
6284
6275
return ;
6285
6276
}
6286
6277
#endif
6287
6278
6288
- #if NCNN_RUNTIME_CPU && NCNN_XOP && __SSE2__ && !__XOP__
6279
+ #if NCNN_RUNTIME_CPU && NCNN_XOP && __SSE2__ && !__XOP__ && ! __AVX2__ && ! __AVXVNNI__ && ! __AVX512VNNI__
6289
6280
if (ncnn ::cpu_support_x86_xop ())
6290
6281
{
6291
6282
conv3x3s1_winograd43_int8_xop (bottom_blob , top_blob , AT , nT , opt );
6292
6283
return ;
6293
6284
}
6294
- #endif
6295
6285
#endif
6296
6286
6297
6287
int outw = top_blob .w ;
0 commit comments