diff --git a/include/ideep/operators/conv.hpp b/include/ideep/operators/conv.hpp index a6095ed9..27ee84b6 100644 --- a/include/ideep/operators/conv.hpp +++ b/include/ideep/operators/conv.hpp @@ -1671,10 +1671,7 @@ struct convolution_forward auto pd = get_primitive_desc( src_desc, weights_desc, bias_desc, dst_desc, strides, dil_compatible, padding_l, padding_r, weights.get_hash(), is_channels_last, op_attr, aalgorithm, aprop_kind, aengine); - conv_deconv_utils::obtain_runtime_zero_point( - src, src_zero_point, DNNL_ARG_SRC, pd.first.get_primitive_attr(), - ideep::engine(pd.first.get_engine().get_kind()), src_zp_tensor); - convolution_forward_params params( + convolution_forward_params param( std::move(pd.first), std::move(pd.second), std::move(op_attr), groups, std::move(bias_attr)); #else // Used for to_mkldnn() path @@ -1828,10 +1825,6 @@ struct convolution_forward src_desc, weights_desc, bias_desc, dst_desc, strides, dil_compatible, padding_l, padding_r, weights.get_hash(), is_channels_last, op_attr, aalgorithm, aprop_kind, aengine); - conv_deconv_utils::obtain_runtime_zero_point( - src, src_zero_point, DNNL_ARG_SRC, pd.first.get_primitive_attr(), - ideep::engine(pd.first.get_engine().get_kind()), src_zp_tensor); - param = {std::move(pd.first), std::move(pd.second), std::move(op_attr), groups, std::move(bias_attr)}; #else auto pd = get_primitive_desc( diff --git a/include/ideep/operators/matmul.hpp b/include/ideep/operators/matmul.hpp index ae3e9199..a3339ecf 100644 --- a/include/ideep/operators/matmul.hpp +++ b/include/ideep/operators/matmul.hpp @@ -1203,6 +1203,30 @@ struct matmul_forward : public dnnl::matmul, // Create pd and primitive +#ifdef __aarch64__ + auto key = utils::create_key( + src_desc, + weights.get_desc(), + bias_desc, + dst_desc, + op_attr, + with_bias, + omp_get_max_threads(), + weights.get_hash()); + + if (with_bias) { + param.pd = primitive_desc( + aengine, src_desc, weights.get_desc(), bias_desc, dst_desc, op_attr); + } else { + param.pd = primitive_desc( + aengine, src_desc, weights.get_desc(), dst_desc, op_attr); + } + + auto pd_pair = fetch_or_create(key, [&]() { + return std::make_pair(param.pd, super(param.pd)); + }); + param.primitive = std::move(pd_pair.second); +#else auto key = utils::create_key( src_desc, weights.get_desc(), @@ -1221,6 +1245,7 @@ struct matmul_forward : public dnnl::matmul, } }); param.primitive = super(param.pd); +#endif // Create src reorder primitive with runtime scales/zero point auto src_reorder_pd = dnnl::reorder::primitive_desc(aengine, src.get_desc(), aengine, src_desc, src_attr);