Skip to content

Commit

Permalink
src: cpu: x64: matmul: prevent vnni_granularity division by zero
Browse files Browse the repository at this point in the history
  • Loading branch information
msotoflo authored and a-sidorova committed Jan 19, 2022
1 parent e15d07b commit f941509
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/cpu/x64/matmul/brgemm_matmul_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -785,6 +785,7 @@ status_t init_brgemm_matmul_conf(cpu_isa_t isa, brgemm_matmul_conf_t &bgmmc,
// required granularity for k dimension
bgmmc.required_k_granularity
= bgmmc.is_amx ? data_type_vnni_granularity(bgmmc.wei_dt) : 1;
if (bgmmc.required_k_granularity == 0) return status::unimplemented;
bgmmc.wei_k_blk = data_type_vnni_simd_elems<avx512_core>(bgmmc.wei_dt);

bgmmc.wei_n_blk = get_default_n_block(format_tag::undef);
Expand Down

0 comments on commit f941509

Please sign in to comment.