Skip to content

Commit

Permalink
[CPU] Updated aux GPR count for Load/Store Emitters
Browse files Browse the repository at this point in the history
  • Loading branch information
a-sidorova committed Feb 23, 2024
1 parent c768c0e commit 82979eb
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ size_t store_emitter_params::hash() const {
}

static int get_aux_regs_as_temp(const size_t byte_size, const bool is_fill = false) {
if (!one_of(byte_size, 64u, 32u, 16u))
if (one_of(byte_size, 64u, 32u, 16u))
return 0;
if (one_of(byte_size % 16, 1u, 2u, 3u))
return 1;
if (mayiuse(cpu::x64::avx512_core) && is_fill)
return 1;
Expand Down
35 changes: 34 additions & 1 deletion src/plugins/intel_cpu/tests/unit/jit_kernel_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -324,13 +324,23 @@ TEST(JitKernel, variable_load_and_store) {
{
jit_variable_load_store_test_kernel<uint8_t, float> kernel;
if (mayiuse(cpu_isa_t::avx512_core)) {
kernel.test<16, 11, false>();
kernel.test<16, 16, false>();
kernel.test<16, 15, false>();
kernel.test<16, 10, false>();
kernel.test<16, 1, false>();
}
if (mayiuse(cpu_isa_t::avx2)) {
kernel.test<8, 8, false>();
kernel.test<8, 7, false>();
kernel.test<8, 6, false>();
kernel.test<8, 5, false>();
kernel.test<8, 4, false>();
}
if (mayiuse(cpu_isa_t::sse41)) {
kernel.test<4, 4, false>();
kernel.test<4, 3, false>();
kernel.test<4, 2, false>();
kernel.test<4, 1, false>();
}
}

Expand Down Expand Up @@ -360,6 +370,29 @@ TEST(JitKernel, variable_load_and_store) {
}
}

{
jit_variable_load_store_test_kernel<float, uint8_t> kernel;
if (mayiuse(cpu_isa_t::avx512_core)) {
kernel.test<16, 16, true>();
kernel.test<16, 10, true>();
kernel.test<16, 2, true>();
kernel.test<16, 1, true>();
}
if (mayiuse(cpu_isa_t::avx2)) {
kernel.test<8, 8, true>();
kernel.test<8, 7, true>();
kernel.test<8, 6, true>();
kernel.test<8, 5, true>();
kernel.test<8, 4, true>();
}
if (mayiuse(cpu_isa_t::sse41)) {
kernel.test<4, 4, true>();
kernel.test<4, 3, true>();
kernel.test<4, 2, true>();
kernel.test<4, 1, true>();
}
}

{
jit_variable_load_store_test_kernel<int32_t, bfloat16_t> kernel;
if (mayiuse(cpu_isa_t::avx512_core)) {
Expand Down

0 comments on commit 82979eb

Please sign in to comment.