Skip to content

Commit

Permalink
[Fork][Fix] Fix avx2 bf16 reorder
Browse files Browse the repository at this point in the history
  • Loading branch information
maxnick committed Jul 3, 2024
1 parent d19b5d8 commit dc69ce5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/cpu/x64/jit_uni_reorder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,9 @@ struct jit_uni_reorder_kernel_f32_t : public kernel_t, public jit_generator {
&& utils::everyone_is(0, p.ioff, p.ooff) /* do we need this? */
&& utils::one_of(p.beta, 0.f, 1.f) /* anything else? */
&& simple_impl_desc_init(p, nullptr) && mayiuse(sse41)
&& IMPLICATION(utils::one_of(bf16, p.itype, p.otype),
mayiuse(avx512_core) || mayiuse(avx2))
&& IMPLICATION(bf16 == p.itype, mayiuse(avx2))
&& IMPLICATION((bf16 == p.otype) && (bf16 != p.itype),
mayiuse(avx512_core) || mayiuse(avx2_vnni_2))
&& IMPLICATION(utils::one_of(f16, p.itype, p.otype),
mayiuse(avx512_core_fp16) || mayiuse(avx2))
&& IMPLICATION(!is_direct_copy(p), prb_has_small_strides(p));
Expand Down Expand Up @@ -1428,7 +1429,7 @@ struct jit_uni_reorder_kernel_f32_t : public kernel_t, public jit_generator {
otype_sz_ = data_type_size(prb_.otype);
stype_sz_ = sizeof(float);
if (prb_.otype == data_type::bf16 && !mayiuse(avx512_core_bf16)
&& !mayiuse(avx2_vnni_2)) {
&& !mayiuse(avx2_vnni_2) && mayiuse(avx512_core)) {
bf16_emu_ = utils::make_unique<bf16_emulation_t>(this,
bf16_emu_reserv_1_, bf16_emu_reserv_2_, bf16_emu_reserv_3_,
bf16_emu_scratch_, bf16_emu_reserv_4_);
Expand Down

0 comments on commit dc69ce5

Please sign in to comment.