Skip to content

Commit

Permalink
cpu: coverity: cast to avoid overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
nivas-x86 committed Jun 11, 2024
1 parent 5f5f0aa commit 302c601
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cpu/rnn/ref_rnn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ status_t dnnl::impl::cpu::_ref_rnn_common_t<aprop, src_type, weights_type,

if (rnn_.use_matmul) {
{ // init layer matmuls
const dim_t M = rnn_.n_gates * rnn_.dhc;
const dim_t M = static_cast<dim_t>(rnn_.n_gates) * rnn_.dhc;
const dim_t N = rnn_.mb;
const dim_t K = rnn_.slc;
const dim_t LDA = rnn_.weights_layer_ld;
Expand Down

0 comments on commit 302c601

Please sign in to comment.