diff --git a/src/cpu/rnn/ref_rnn.hpp b/src/cpu/rnn/ref_rnn.hpp index 7198f8b432f..eccaaebb875 100644 --- a/src/cpu/rnn/ref_rnn.hpp +++ b/src/cpu/rnn/ref_rnn.hpp @@ -305,12 +305,16 @@ struct _ref_rnn_common_t : public primitive_t { (rnn_.is_bf16_conf() || rnn_.is_f32_conf())); if (!ok) return status::unimplemented; - +#if !__BUILD_GEMM_AVX512 + const auto enable_brgemm_gru = mayiuse(avx512_core) && rnn_.is_cell_dt_f32(); +#else + const auto enable_brgemm_gru = false; +#endif // Support for GRU / AUGRU cell in BRGEMM-based implementation is // limited by forward_inference pass for now, all_f32 is disabled - // due to performance degradation. + // due to performance degradation except the case GEMM legacy is removed on avx512 core. // TODO: Improve GRU / AUGRU coverage in BRGEMM-based implementation - ok = IMPLICATION(rnn_.is_orig_gru, + ok = IMPLICATION(rnn_.is_orig_gru && !enable_brgemm_gru, this->desc()->prop_kind == forward_inference && !rnn_.is_cell_dt_f32()); if (!ok) return status::unimplemented; diff --git a/src/cpu/x64/gemm/gemm_info.cpp b/src/cpu/x64/gemm/gemm_info.cpp index acab57ca9eb..eef0772d89b 100644 --- a/src/cpu/x64/gemm/gemm_info.cpp +++ b/src/cpu/x64/gemm/gemm_info.cpp @@ -360,6 +360,7 @@ void gemm_info_t::jit_init(void) { static std::once_flag initialized; static std::atomic st(dnnl_success); std::call_once(initialized, [&, um] { + MAYBE_UNUSED(um); #if __BUILD_GEMM_AVX512 const bool b_is_s8 = data_traits::data_type == data_type::s8; #endif