Skip to content

Commit

Permalink
cpu: x64: rnn: multiplier is not required for gru
Browse files Browse the repository at this point in the history
The multiplier (2) is only required when rnn.brgemm_fwd_iter_layer_fuse_possible
is true and is only used in kernel_fused_iter_layer.
  • Loading branch information
densamoilov committed Jan 30, 2025
1 parent 274b9c6 commit efe1c13
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/cpu/x64/rnn/brgemm_cell_common_fwd.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright 2021-2024 Intel Corporation
* Copyright 2021-2025 Intel Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -688,9 +688,8 @@ void brgemm_gru_t<src_t, weights_t, scratch_t, gemm_acc_t>::kernel(
gemm_acc_t *const amx_buffer = is_amx
? amx_scratchpad_ + rnn_.m_block * rnn_.n_block * ithr
: nullptr;
const int max_K_Block = 2
* nstl::max(rnn_.KB1_blocks + 1,
nstl::max(rnn_.KBproj_blocks + 1, rnn_.KB2_blocks + 1));
const int max_K_Block = nstl::max(rnn_.KB1_blocks + 1,
nstl::max(rnn_.KBproj_blocks + 1, rnn_.KB2_blocks + 1));
brgemm_batch_element_t *const addr_batch
= addr_batch_global_ + ithr * max_K_Block;

Expand Down

0 comments on commit efe1c13

Please sign in to comment.