Skip to content

Commit fb24b40

Browse files
xipingyanluweizhou2016
authored andcommitted
Fix thread safety issue.
https://jira.devtools.intel.com/browse/CVS-96155 Signed-off-by: Yan, Xiping <xiping.yan@intel.com>
1 parent b394d37 commit fb24b40

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/cpu/x64/jit_brgemm_conv_utils.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ struct brg_blocking_t : public jit_brgemm_conv_conf_t {
423423
static constexpr int bcast_simd = 16;
424424

425425
int sp, sp_block, nb_sp;
426-
static int last_ic_block_size;
426+
static thread_local int last_ic_block_size;
427427

428428
void get_from_jcp(const jit_brgemm_conv_conf_t &jcp) { *this = jcp; }
429429
void save_to_jcp(jit_brgemm_conv_conf_t &jcp) const { jcp = *this; }
@@ -494,7 +494,7 @@ struct brg_blocking_t : public jit_brgemm_conv_conf_t {
494494
unsigned brg_blocking_t::L1;
495495
unsigned brg_blocking_t::L2;
496496
unsigned brg_blocking_t::L3;
497-
int brg_blocking_t::last_ic_block_size;
497+
thread_local int brg_blocking_t::last_ic_block_size;
498498

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

0 commit comments

Comments
 (0)