Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cpu: aarch64: softmax: fix segv, improve performance, enable blk_size = 4 #1817

Merged
merged 2 commits into from
Mar 12, 2024

Conversation

kawakami-k
Copy link
Contributor

Description

This PR includes the following three improvement for Softmax on AArch64.

  • SIGSEGV for blk_size = 8 on SVE512 is fixed.
  • Performance has been improved.
  • blk_size = 4 is enabled.

SIGSEGV can be reproduce by the following command on AArch64 SVE 512 environment with 51a92cc

./benchdnn --softmax --stag=aBx8b 256x10x1x1

stag=aBx4b is added to tests/benchdnn/inputs/softmax/test_softmax_all for testing blk_size =4 cases.

Checklist

General

  • Do all unit and benchdnn tests (make test and make test_benchdnn_*) pass locally for each commit?
  • Have you formatted the code using clang-format?

Bug fixes

  • Have you included information on how to reproduce the issue (either in a github issue or in this PR)?
  • Have you added relevant regression tests?

@@ -46,6 +46,7 @@ const std::map<pk_impl_key_t, std::vector<impl_list_item_t>> &impl_list_map() {
CPU_INSTANCE_X64(jit_uni_softmax_fwd_t)
CPU_INSTANCE_AARCH64(jit_uni_softmax_fwd_t<sve_512>)
CPU_INSTANCE_AARCH64(jit_uni_softmax_fwd_t<sve_256>)
CPU_INSTANCE_AARCH64(jit_uni_softmax_fwd_t<sve_128>)
Copy link
Contributor

Choose a reason for hiding this comment

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

Minor: please consider removing templated argument for softmax implementation as with time it becomes bulky.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for the comment. I'd like to improve templated argument in future PR.

@vpirogov vpirogov added this to the v3.5 milestone Mar 7, 2024
@mgouicem mgouicem merged commit 64e5fc5 into uxlfoundation:main Mar 12, 2024
10 checks passed
@vpirogov vpirogov added the platform:cpu-aarch64 Codeowner: @oneapi-src/onednn-cpu-aarch64 label May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform:cpu-aarch64 Codeowner: @oneapi-src/onednn-cpu-aarch64
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants