Add LUT-based leaky relu for QASYMM8 on CPU

* Add LUT generation function for Leaky ReLU.
* Some additional changes in the existing LUT implementation:
  + Bring back the NEON implementation of hard swish for 32-bit
    build. Library size of 64-bit build is not affected.
  + Add some extra #ifdef to remove unnecessary code in 32-bit
    build.

Resolves: COMPMID-5386
Signed-off-by: Viet-Hoa Do <viet-hoa.do@arm.com>
Change-Id: I1ea49611cc922765ee741e31138c888401d33e9b
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/7845
Benchmark: Arm Jenkins <bsgcomp@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Gunes Bayir <gunes.bayir@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
5 files changed
tree: e23fd9b89c753f9731e1e8ec4a0d9ca468f9f683
  1. .clang-format
  2. .clang-tidy
  3. .github/
  4. .gitignore
  5. .mdl.rb
  6. .pre-commit-config.yaml
  7. Android.bp
  8. LICENSE
  9. README.md
  10. SConscript
  11. SConstruct
  12. SECURITY.md
  13. arm_compute/
  14. data/
  15. docs/
  16. examples/
  17. filedefs.json
  18. filelist.json
  19. include/
  20. python/
  21. scripts/
  22. src/
  23. support/
  24. tests/
  25. utils/
README.md

⚠ Important From release 22.05: 'master' branch has been replaced with 'main' following our inclusive language update, more information here.

⚠ Important From release 22.08: armv7a with Android build will no longer be tested or maintained.

Compute Library

The Compute Library is a collection of low-level machine learning functions optimized for Arm® Cortex®-A and Arm® Mali™ GPUs architectures.

The library provides superior performance to other open source alternatives and immediate support for new Arm® technologies e.g. SVE2.

Key Features:

  • Open source software available under a permissive MIT license
  • Over 100 machine learning functions for CPU and GPU
  • Multiple convolution algorithms (GeMM, Winograd, FFT, Direct and indirect-GeMM)
  • Support for multiple data types: FP32, FP16, INT8, UINT8, BFLOAT16
  • Micro-architecture optimization for key ML primitives
  • Highly configurable build options enabling lightweight binaries
  • Advanced optimization techniques such as kernel fusion, Fast math enablement and texture utilization
  • Device and workload specific tuning using OpenCL tuner and GeMM optimized heuristics
RepositoryLink
Releasehttps://github.com/arm-software/ComputeLibrary
Developmenthttps://review.mlplatform.org/#/admin/projects/ml/ComputeLibrary

Documentation

Documentation

Note: The documentation includes the reference API, changelogs, build guide, contribution guide, errata, etc.

Pre-built binaries

All the binaries can be downloaded from here or from the tables below.

PlatformOperating SystemRelease archive (Download)
Raspberry Pi 4Linux 32bit
Raspberry Pi 4Linux 64bit
Odroid N2Linux 64bit
HiKey960Linux 64bit
ArchitectureOperating SystemRelease archive (Download)
armv7Linux
arm64-v8aAndroid
arm64-v8aLinux
arm64-v8.2-aAndroid
arm64-v8.2-aLinux

Pre-build binaries are generated with the following security / good coding practices related flags:

-Wall, -Wextra, -Wformat=2, -Winit-self, -Wstrict-overflow=2, -Wswitch-default, -Woverloaded-virtual, -Wformat-security, -Wctor-dtor-privacy, -Wsign-promo, -Weffc++, -pedantic, -fstack-protector-strong

Supported Architectures/Technologies

  • Arm® CPUs:

    • Arm® Cortex®-A processor family using Arm® Neon™ technology
    • Arm® Cortex®-R processor family with Armv8-R AArch64 architecture using Arm® Neon™ technology
    • Arm® Cortex®-X1 processor using Arm® Neon™ technology
  • Arm® Mali™ GPUs:

    • Arm® Mali™-G processor family
    • Arm® Mali™-T processor family
  • x86

Supported Systems

  • Android™
  • Bare Metal
  • Linux®
  • macOS®
  • Tizen™

Resources

How to contribute

Contributions to the Compute Library are more than welcome. If you are interested on contributing, please have a look at our how to contribute guidelines.

Developer Certificate of Origin (DCO)

Before the Compute Library accepts your contribution, you need to certify its origin and give us your permission. To manage this process we use the Developer Certificate of Origin (DCO) V1.1 (https://developercertificate.org/)

To indicate that you agree to the the terms of the DCO, you "sign off" your contribution by adding a line with your name and e-mail address to every git commit message:

Signed-off-by: John Doe <john.doe@example.org>

You must use your real name, no pseudonyms or anonymous contributions are accepted.

Public mailing list

For technical discussion, the ComputeLibrary project has a public mailing list: acl-dev@lists.linaro.org The list is open to anyone inside or outside of Arm to self subscribe. In order to subscribe, please visit the following website: https://lists.linaro.org/mailman3/lists/acl-dev.lists.linaro.org/

License and Contributions

The software is provided under MIT license. Contributions to this project are accepted under the same license.

Trademarks and Copyrights

Android is a trademark of Google LLC.

Arm, Cortex, Mali and Neon are registered trademarks or trademarks of Arm Limited (or its subsidiaries) in the US and/or elsewhere.

Linux® is the registered trademark of Linus Torvalds in the U.S. and other countries.

Mac and macOS are trademarks of Apple Inc., registered in the U.S. and other countries.

Tizen is a registered trademark of The Linux Foundation.