Skip to content

Commit 215a629

Browse files
committed
[Snippets][CPU] Fix full dim subtensor setting for port descriptor
1 parent 3e7eeb6 commit 215a629

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/common/snippets/src/lowered/port_descriptor.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ void PortDescriptor::validate_arguments() {
3838
// NCHW layout by default
3939
std::iota(m_layout.begin(), m_layout.end(), 0);
4040
}
41+
OPENVINO_ASSERT(m_subtensor_shape.size() <= m_tensor_shape->size(),
42+
"Snippets tensor descriptor: Subtensor shape must be less than or equal to tensor shape");
4143
OPENVINO_ASSERT(m_layout.size() == m_tensor_shape->size(), "Snippets tensor descriptor: Layout size must be equal to the shape size");
4244
}
4345

src/plugins/intel_cpu/src/transformations/snippets/x64/pass/brgemm_to_brgemm_cpu.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ namespace {
2727
template <typename T>
2828
void set_full_port_desc(const T& port) {
2929
const auto& shape_rank = port.get_partial_shape().size();
30-
static const std::vector<size_t> full_dim_subtensor(std::min(shape_rank, static_cast<size_t>(2)),
31-
ov::snippets::utils::get_full_dim_value());
30+
const std::vector<size_t> full_dim_subtensor(std::min(shape_rank, static_cast<size_t>(2)),
31+
ov::snippets::utils::get_full_dim_value());
3232
PortDescriptorUtils::set_port_descriptor(port, full_dim_subtensor);
3333
}
3434
} // namespace

0 commit comments

Comments
 (0)