Skip to content

Commit

Permalink
fix the mlp accuracy
Browse files Browse the repository at this point in the history
  • Loading branch information
xczhai committed Nov 20, 2024
1 parent fd99fce commit c13dfe1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/plugins/intel_cpu/src/nodes/kernels/x64/mlp_kernel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -617,8 +617,8 @@ void ReduceAdd2bh::generate() {
vaddps(zmm0, zmm0, zmm1);
vaddps(zmm2, zmm2, zmm3);
if (m_out_f32 && m_to_f16) {
vmovups(ptr[dst + loop_i * 2], zmm0);
vmovups(ptr[dst + loop_i * 2 + 64], zmm2);
vmovups(ptr[dst + loop_i * 4], zmm0);
vmovups(ptr[dst + loop_i * 4 + 64], zmm2);
prefetchwt1(ptr[prefetch_dst + loop_i * 2]);
} else {
// convert fp32 to fp16 or bf16
Expand Down Expand Up @@ -655,8 +655,8 @@ void ReduceAdd2bh::generate() {
vmovups(zmm0, ptr[src0 + loop_i * 4]);
vmovups(zmm2, ptr[src0 + loop_i * 4 + 16 * 4]);
if (m_out_f32 && m_to_f16) {
vmovups(ptr[dst + loop_i * 2], zmm0);
vmovups(ptr[dst + loop_i * 2 + 64], zmm2);
vmovups(ptr[dst + loop_i * 4], zmm0);
vmovups(ptr[dst + loop_i * 4 + 64], zmm2);
prefetchwt1(ptr[prefetch_dst + loop_i * 2]);
} else {
if (m_to_f16) {
Expand Down

0 comments on commit c13dfe1

Please sign in to comment.