@@ -192,8 +192,9 @@ struct jit_uni_reorder_kernel_f32_t : public kernel_t, public jit_generator {
192
192
&& utils::everyone_is (0 , p.ioff , p.ooff ) /* do we need this? */
193
193
&& utils::one_of (p.beta , 0 .f , 1 .f ) /* anything else? */
194
194
&& simple_impl_desc_init (p, nullptr ) && mayiuse (sse41)
195
- && IMPLICATION (utils::one_of (bf16, p.itype , p.otype ),
196
- mayiuse (avx512_core) || mayiuse (avx2))
195
+ && IMPLICATION (bf16 == p.itype , mayiuse (avx2))
196
+ && IMPLICATION ((bf16 == p.otype ) && (bf16 != p.itype ),
197
+ mayiuse (avx512_core) || mayiuse (avx2_vnni_2))
197
198
&& IMPLICATION (utils::one_of (f16, p.itype , p.otype ),
198
199
mayiuse (avx512_core_fp16) || mayiuse (avx2))
199
200
&& IMPLICATION (!is_direct_copy (p), prb_has_small_strides (p));
@@ -1428,7 +1429,7 @@ struct jit_uni_reorder_kernel_f32_t : public kernel_t, public jit_generator {
1428
1429
otype_sz_ = data_type_size (prb_.otype );
1429
1430
stype_sz_ = sizeof (float );
1430
1431
if (prb_.otype == data_type::bf16 && !mayiuse (avx512_core_bf16)
1431
- && !mayiuse (avx2_vnni_2)) {
1432
+ && !mayiuse (avx2_vnni_2) && mayiuse (avx512_core) ) {
1432
1433
bf16_emu_ = utils::make_unique<bf16_emulation_t >(this ,
1433
1434
bf16_emu_reserv_1_, bf16_emu_reserv_2_, bf16_emu_reserv_3_,
1434
1435
bf16_emu_scratch_, bf16_emu_reserv_4_);
0 commit comments