Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
[mkldnn-v1.0]rm int8 sum workaround (#16623)
Browse files Browse the repository at this point in the history
* rm int8 sum workaround due to mkldnn lib update

* simple dims asignments in mkldnn_quantized_elemwise_add.cc
  • Loading branch information
rongzha1 authored and pengzhao-intel committed Oct 28, 2019
1 parent 05ed579 commit 5c7d151
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,11 @@ static void MKLDNNQuantizedElemwiseAddForward(const nnvm::NodeAttrs& attrs, cons
std::vector<mkldnn::memory::desc> in_desc;
in_desc.push_back(dataA_mem->get_desc());
in_desc.push_back(dataB_mem->get_desc());
auto output_desc = dataA_mem->get_desc();
output_desc.data.data_type = static_cast<mkldnn_data_type_t>(output_data_type);
const auto in_shape = in_data[quantized_elemwise_add_enum::kDataA].shape();
mkldnn::memory::dims i_dims(in_shape.begin(), in_shape.end());
auto output_desc = mkldnn::memory::desc(i_dims,
output_data_type,
mkldnn::memory::format_tag::any);
mkldnn::sum::primitive_desc pdesc(output_desc, scales, in_desc, engine);
auto mem = CreateMKLDNNMem(out_data[quantized_elemwise_add_enum::kOut],
pdesc.dst_desc(),
Expand Down

0 comments on commit 5c7d151

Please sign in to comment.