Skip to content

Commit 9972cb8

Browse files
kwierschtprimak
authored andcommitted
cpu: x64: avoid repeated bias loads in brgconv postops kernel
1 parent d3af877 commit 9972cb8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/cpu/x64/jit_brgemm_post_ops.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright 2020-2022 Intel Corporation
2+
* Copyright 2020-2023 Intel Corporation
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -692,14 +692,14 @@ struct jit_brgemm_kernel_post_ops : public jit_generator {
692692
if (req_comp) maybe_apply_comp(m_block, n_block, tail);
693693

694694
if (brg.alpha != 0 && jcp.with_bias) {
695-
for_(int m = 0; m < m_block; m++)
696695
for (int n = 0; n < n_block; n++) {
697696
auto vmm_bias = vmm_tmp(0);
698697
auto bias_addr = ptr[aux_reg_bias
699698
+ bia_typesize_ * (n * brg.ld_block)];
700-
701699
cvt2ps(bia_dt_, vmm_bias, bias_addr, tail, false, k_mask);
702-
vaddps(vector(m, n), vmm_bias);
700+
for (int m = 0; m < m_block; m++) {
701+
vaddps(vector(m, n), vmm_bias);
702+
}
703703
}
704704
}
705705

0 commit comments

Comments
 (0)