Skip to content

Commit

Permalink
cpu: x64: brgemm convolutions: make last_ic_block_size thread safe
Browse files Browse the repository at this point in the history
  • Loading branch information
ankalinin committed Dec 1, 2022
1 parent c3cb1d5 commit 2955c9d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cpu/x64/jit_brgemm_conv_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ struct brg_blocking_t : public jit_brgemm_conv_conf_t {
static constexpr int bcast_simd = 16;

int sp, sp_block, nb_sp;
static int last_ic_block_size;
static thread_local int last_ic_block_size;

void get_from_jcp(const jit_brgemm_conv_conf_t &jcp) { *this = jcp; }
void save_to_jcp(jit_brgemm_conv_conf_t &jcp) const { jcp = *this; }
Expand Down Expand Up @@ -494,7 +494,7 @@ struct brg_blocking_t : public jit_brgemm_conv_conf_t {
unsigned brg_blocking_t::L1;
unsigned brg_blocking_t::L2;
unsigned brg_blocking_t::L3;
int brg_blocking_t::last_ic_block_size;
thread_local int brg_blocking_t::last_ic_block_size;

float brg_blocking_t::io_k(dim_t src, dim_t wei, dim_t dst, float n, float pk,
bool is_broadcast, bool is_shared) const {
Expand Down

0 comments on commit 2955c9d

Please sign in to comment.