Commit 9e885d05 authored by Pruthvi's avatar Pruthvi Committed by Robert Kimball

fix address sanitizer issue in batchnorm fprop and bprop kernel (#2159)

parent d4f8bfdc
......@@ -60,7 +60,8 @@ namespace ngraph
#pragma clang diagnostic pop
shared_ptr<uint8_t> stacked_weights(new uint8_t[weight_sizes[0] + weight_sizes[1]]);
shared_ptr<uint8_t> stacked_weights(new uint8_t[weight_sizes[0] + weight_sizes[1]],
std::default_delete<uint8_t[]>());
const float ops_scale = 1.f;
const float ops_alpha = -0.f; // relu negative slope
......@@ -319,9 +320,10 @@ namespace ngraph
args[1].get_size() * args[1].get_element_type().size()};
#pragma clang diagnostic pop
shared_ptr<uint8_t> stacked_weights(new uint8_t[weight_sizes[0] + weight_sizes[1]]);
shared_ptr<uint8_t> stacked_dweights(
new uint8_t[weight_sizes[0] + weight_sizes[1]]);
shared_ptr<uint8_t> stacked_weights(new uint8_t[weight_sizes[0] + weight_sizes[1]],
std::default_delete<uint8_t[]>());
shared_ptr<uint8_t> stacked_dweights(new uint8_t[weight_sizes[0] + weight_sizes[1]],
std::default_delete<uint8_t[]>());
auto& mkldnn_emitter = external_function->get_mkldnn_emitter();
auto weights_shape = Shape{2, args[0].get_size()};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment