diff --git a/inference-engine/src/mkldnn_plugin/mkldnn_memory.cpp b/inference-engine/src/mkldnn_plugin/mkldnn_memory.cpp index daaa5c9033a719..599fc447698a4f 100644 --- a/inference-engine/src/mkldnn_plugin/mkldnn_memory.cpp +++ b/inference-engine/src/mkldnn_plugin/mkldnn_memory.cpp @@ -277,7 +277,8 @@ std::string MKLDNNMemory::formatToString(memory::format_tag fmt) { void *MKLDNNMemory::GetPtr() const { auto ptr = static_cast(GetData()); - mkldnn::impl::memory_desc_wrapper wrapper(GetDescriptor().data); + auto md = GetDescriptor().data; + mkldnn::impl::memory_desc_wrapper wrapper(md); ptr += wrapper.offset0() * wrapper.data_type_size(); return ptr; }