Skip to content

fix: Enable assembly kernel for int8 MAX pooling.#1278

Open
morgolock wants to merge 1 commit intomainfrom
pr/enable_asm_int8_max_pool
Open

fix: Enable assembly kernel for int8 MAX pooling.#1278
morgolock wants to merge 1 commit intomainfrom
pr/enable_asm_int8_max_pool

Conversation

@morgolock
Copy link
Copy Markdown
Contributor

Change-Id: I96cdf94dc29348a01b8f47aba1b6afd6d82fbcb9

Copy link
Copy Markdown
Contributor

@gunes-arm gunes-arm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regarding the commit message, I think we should add the tickets and the GitHub issue number.

Question to you: Is this a fix or something else? Looks like a performance improvement to me.

Comment thread src/cpu/kernels/internal/CpuPool2dAssemblyWrapperKernel.cpp Outdated
}
else
{
if (src->data_type() == DataType::QASYMM8)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the speciality around QASYMM8 is that the minimum value is 0 and the initial value is set to this. So, !exclude_padding is not supported when the type is QASYMM8_SIGNED as the minimum value must be -128. I wonder if it's an easy piece of code that we can change to support both types. Given that it's only QASYMM8 for now, we should state it in the commit message as is, not as Int8.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the commit msg to mention just QASYMM8 for now.

I'll look into adding support for QASYMM8_SIGNED in a different patch to keep this change small.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you also update the PR title and description? I also have another comment regarding the commit category, which is around the top of the main conversation panel.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I created the tickets below for the additional investigation work:

  • MLCE-1821
  • MLCE-1822

I'll update the commit msg and pr title to perf: Enable assembly kernel for QASYMM8 MAX pooling

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR title is still the same, isn't it?

Comment thread src/cpu/kernels/internal/CpuPool2dAssemblyWrapperKernel.cpp
Comment thread tests/validation/runtime/experimental/operators/CpuPool2d.cpp
@morgolock morgolock force-pushed the pr/enable_asm_int8_max_pool branch from 48ff668 to 52cc9bf Compare April 10, 2026 15:31
@morgolock morgolock force-pushed the pr/enable_asm_int8_max_pool branch from 52cc9bf to f43873f Compare April 16, 2026 09:12
Change-Id: I96cdf94dc29348a01b8f47aba1b6afd6d82fbcb9
Signed-off-by: Pablo Marquez Tello <pablo.tello@arm.com>
@morgolock morgolock force-pushed the pr/enable_asm_int8_max_pool branch from f43873f to ada1be8 Compare April 16, 2026 13:07
!info.exclude_padding && has_padding,
"Assembly kernels do not support padding for QASYMM8 with same src/dst quantization info");
ARM_COMPUTE_RETURN_ERROR_ON_MSG(info.pool_type != PoolingType::MAX && !info.exclude_padding && has_padding,
"Assembly kernels only support padded AVG pooling for QASYMM8 with "
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment should probably slightly change to reflect the != MAX check. Such as

Assembly kernels only support MAX pooling if there is padding and exclude_padding is false.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants