Skip to content

Commit 11de65b

Browse files
committed
fix
1 parent bc3de69 commit 11de65b

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

src/plugins/intel_cpu/src/emitters/snippets/x64/kernel_executors/brgemm_batched.cpp

+1-4
Original file line numberDiff line numberDiff line change
@@ -224,10 +224,7 @@ void BrgemmBatchedKernelExecutor::execute(const BrgemmBatchedKernelExecutor* exe
224224
auto iter_count = config.get_iter_count();
225225
auto iter_size = config.get_K();
226226

227-
if (config.get_K() % iter_count) { // test
228-
--iter_count;
229-
}
230-
227+
OPENVINO_ASSERT(iter_size % iter_count == 0, "Incompatible iterations count in brgemm");
231228
iter_size /= iter_count;
232229

233230
size_t stride_A = iter_size * dnnl_data_type_size(config.get_dt_in0());

src/plugins/intel_cpu/src/transformations/snippets/x64/pass/lowered/build_brgemm.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ bool pass::BuildBrgemm::run(snippets::lowered::LinearIR& linear_ir,
6262
continue;
6363
}
6464

65+
if (inner_loop_info->get_work_amount() % inner_loop_info->get_increment() != 0) {
66+
continue;
67+
}
6568
auto iter_count = inner_loop_info->get_work_amount() / inner_loop_info->get_increment();
6669

6770
std::shared_ptr<BrgemmCPU> brgemm_node;

src/plugins/intel_cpu/tests/functional/shared_tests_instances/snippets/matmul.cpp

+7
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,13 @@ std::vector<std::vector<ov::test::InputShape>> input_shapes{
3434
{ {{}, {{1, 1, 100, 1024}}}, {{}, {{1, 1, 1024, 100}}} },
3535
{ {{}, {{1, 1, 100, 2500}}}, {{}, {{1, 1, 2500, 100}}} },
3636
{ {{}, {{1, 1, 100, 4500}}}, {{}, {{1, 1, 4500, 100}}} },
37+
{ {{}, {{1, 1, 100, 2048}}}, {{}, {{1, 1, 2048, 100}}} },
38+
{ {{}, {{1, 1, 100, 1024 + 32}}}, {{}, {{1, 1, 1024 + 32, 100}}} },
39+
{ {{}, {{1, 1, 100, 1024 + 16}}}, {{}, {{1, 1, 1024 + 16, 100}}} },
40+
{ {{}, {{1, 1, 100, 1024 + 8}}}, {{}, {{1, 1, 1024 + 8, 100}}} },
41+
{ {{}, {{1, 1, 100, 1024 + 4}}}, {{}, {{1, 1, 1024 + 4, 100}}} },
42+
{ {{}, {{1, 1, 100, 1024 + 2}}}, {{}, {{1, 1, 1024 + 2, 100}}} },
43+
{ {{}, {{1, 1, 100, 1024 + 1}}}, {{}, {{1, 1, 1024 + 1, 100}}} },
3744
// Only M dimension is dynamic + one one loop by M
3845
{
3946
{PartialShape{-1, 2, -1, 64}, {{2, 2, 64, 64}, {2, 2, 64, 64}, {2, 2, 35, 64},

0 commit comments

Comments
 (0)