Skip to content

Commit

Permalink
cpu: x64: avoid repeated bias loads in brgconv postops kernel
Browse files Browse the repository at this point in the history
  • Loading branch information
kwiersch authored and tprimak committed Jan 9, 2023
1 parent 0f4697a commit 60f1727
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/cpu/x64/jit_brgemm_post_ops.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright 2020-2022 Intel Corporation
* Copyright 2020-2023 Intel Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -622,14 +622,14 @@ struct jit_brgemm_kernel_post_ops : public jit_generator {
if (maybe_req_comp) maybe_apply_comp(m_block, n_block, tail);

if (brg.alpha != 0 && jcp.with_bias) {
for_(int m = 0; m < m_block; m++)
for (int n = 0; n < n_block; n++) {
auto zmm_bias = Xbyak::Zmm(31);
auto bias_addr = ptr[aux_reg_bias
+ bia_typesize_ * (n * brg.ld_block)];

cvt2ps(bia_dt_, zmm_bias, bias_addr, true, false, k_mask);
vaddps(vector(m, n), zmm_bias);
for (int m = 0; m < m_block; m++) {
vaddps(vector(m, n), zmm_bias);
}
}
}

Expand Down

0 comments on commit 60f1727

Please sign in to comment.