Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions include/ideep/operators/conv.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1671,10 +1671,7 @@ struct convolution_forward
auto pd = get_primitive_desc<with_bias>(
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
Expand Down Expand Up @@ -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<with_bias>(
Expand Down
25 changes: 25 additions & 0 deletions include/ideep/operators/matmul.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand All @@ -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);
Expand Down