Skip to content

Commit

Permalink
fix avx2 bf16 memory free issue of Eltwise node
Browse files Browse the repository at this point in the history
  • Loading branch information
liubo-intel committed Oct 16, 2023
1 parent 324a7b0 commit 339d489
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/plugins/intel_cpu/src/nodes/eltwise.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -806,12 +806,15 @@ struct jit_uni_eltwise_generic : public jit_uni_eltwise_kernel, public jit_gener
uni_vmovups(op, vmm_dst);
break;
case Precision::BF16:
uni_vcvtneps2bf16->emit_code({static_cast<size_t>(vmm_dst.getIdx())},
{static_cast<size_t>(ymm_dst.getIdx())});
if (isa == x64::avx512_core)
if (isa == x64::avx512_core) {
uni_vcvtneps2bf16->emit_code({static_cast<size_t>(vmm_dst.getIdx())},
{static_cast<size_t>(ymm_dst.getIdx())});
vmovdqu16(op, ymm_dst);
else
uni_vmovdqu(op, ymm_dst);
} else {
uni_vcvtneps2bf16->emit_code({static_cast<size_t>(vmm_dst.getIdx())},
{static_cast<size_t>(xmm_dst.getIdx())});
uni_vmovdqu(op, xmm_dst);
}
break;
case Precision::FP16:
vcvtps2ph(op, vmm_dst, 0x4);
Expand Down

0 comments on commit 339d489

Please sign in to comment.