Skip to content

Commit

Permalink
revert StaticMemory changes
Browse files Browse the repository at this point in the history
  • Loading branch information
alvoron committed Nov 27, 2024
1 parent 459519b commit 3688201
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/plugins/intel_cpu/src/cpu_memory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,6 @@ void DnnlMemoryBlock::notifyUpdate() {

StaticMemory::StaticMemory(const dnnl::engine& eng, MemoryDescPtr desc, const void* data, bool pads_zeroing) :
m_eng(eng), m_pMemDesc(desc) {
OPENVINO_ASSERT(!desc->empty() || (desc->empty() && (data == nullptr)));
if (desc->getPrecision() == element::string) {
OPENVINO_THROW("[CPU] StaticMemory object cannot be created for string data.");
}
Expand All @@ -413,7 +412,7 @@ StaticMemory::StaticMemory(const dnnl::engine& eng, MemoryDescPtr desc, const vo

m_size = m_pMemDesc->getCurrentMemSize();

if (data || desc->empty()) {
if (data) {
m_pMemBlock = std::make_shared<StaticMemoryBlock>(const_cast<void*>(data), m_size);
} else {
m_pMemBlock = std::make_shared<StaticMemoryBlock>(m_size);
Expand Down

0 comments on commit 3688201

Please sign in to comment.