Skip to content

Commit

Permalink
Fixes for getDataPtr.
Browse files Browse the repository at this point in the history
  • Loading branch information
maxnick committed Dec 28, 2020
1 parent d2fdb9f commit 9d15d26
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,7 @@ void MKLDNNConvertNode::createPrimitive() {
}

static inline uint8_t* getDataPtr(const MKLDNNMemory& memoryPtr) {
return reinterpret_cast<uint8_t*>(memoryPtr.GetData()) + memoryPtr.GetDescriptor().data.layout_desc.blocking.offset_padding *
MKLDNNExtensionUtils::sizeOfDataType(mkldnn::memory::data_type(memoryPtr.GetDescriptor().data.data_type));
return reinterpret_cast<uint8_t*>(memoryPtr.GetData()) + memoryPtr.GetDescriptor().data.layout_desc.blocking.offset_padding;
}

void MKLDNNConvertNode::execute(mkldnn::stream strm) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@ static TensorDesc makeChannelBlockedTensorDesc(const Precision& precision, const
}

static inline uint8_t* getDataPtr(const MKLDNNMemory& memoryPtr) {
return reinterpret_cast<uint8_t*>(memoryPtr.GetData()) + memoryPtr.GetDescriptor().data.layout_desc.blocking.offset_padding *
MKLDNNExtensionUtils::sizeOfDataType(mkldnn::memory::data_type(memoryPtr.GetDescriptor().data.data_type));
return reinterpret_cast<uint8_t*>(memoryPtr.GetData()) + memoryPtr.GetDescriptor().data.layout_desc.blocking.offset_padding;
}

MKLDNNSplitNode::MKLDNNSplitNode(const InferenceEngine::CNNLayerPtr& layer, const mkldnn::engine& eng, MKLDNNWeightsSharing::Ptr &cache) :
Expand Down

0 comments on commit 9d15d26

Please sign in to comment.