diff --git a/src/core/src/runtime/itensor.cpp b/src/core/src/runtime/itensor.cpp index 2b3a6d49b84947..59d6d283ac3526 100644 --- a/src/core/src/runtime/itensor.cpp +++ b/src/core/src/runtime/itensor.cpp @@ -25,10 +25,10 @@ size_t ITensor::get_byte_size() const { } bool ITensor::is_continuous() const { - if ((get_element_type().bitwidth() < 8) || get_size() == 0) { + if (get_element_type().bitwidth() < 8) // OpenVINO doesn't support strides for lp types return true; - } + const auto& shape = get_shape(); const auto& type = get_element_type(); std::vector strides(shape.size()); diff --git a/src/inference/src/dev/make_tensor.cpp b/src/inference/src/dev/make_tensor.cpp index 2c0f33b352bcf6..1d23c62f86d957 100644 --- a/src/inference/src/dev/make_tensor.cpp +++ b/src/inference/src/dev/make_tensor.cpp @@ -77,7 +77,7 @@ class ViewTensor : public ITensor { auto& shape = get_shape(); if (m_strides.empty() && !shape.empty()) { m_strides.resize(shape.size()); - m_strides.back() = shape.back() == 0 ? 0 : m_element_type.size(); + m_strides.back() = m_element_type.size(); std::transform(shape.crbegin(), shape.crend() - 1, m_strides.rbegin(), diff --git a/src/plugins/intel_cpu/src/memory_desc/cpu_memory_desc_utils.cpp b/src/plugins/intel_cpu/src/memory_desc/cpu_memory_desc_utils.cpp index 8c0dd61e2c309a..fda668156f43a1 100644 --- a/src/plugins/intel_cpu/src/memory_desc/cpu_memory_desc_utils.cpp +++ b/src/plugins/intel_cpu/src/memory_desc/cpu_memory_desc_utils.cpp @@ -58,8 +58,6 @@ DnnlBlockedMemoryDesc MemoryDescUtils::createDnnlBlockedMemoryDesc(InferenceEngi CpuBlockedMemoryDesc MemoryDescUtils::createCpuBlockedMemoryDesc(const ov::SoPtr& tensor) { auto element_type = tensor->get_element_type(); auto shape = tensor->get_shape(); - if (shape.empty()) - shape = {tensor->get_size()}; std::vector blk_order(shape.size()); std::iota(blk_order.begin(), blk_order.end(), 0); std::vector dim_offset(shape.size(), 0);