Elffuss BraidHub

kikocis/kleidiai public

main · 10.5 KiBSourceRawPermalink

Contribution Guidelines

This purpose of this document is to describe how to contribute to Arm® KleidiAI™ and define what is expected from a contribution. It does not cover every corner case; the policy will evolve over time.

Before you start

Before starting non-trivial work, please read:

Reach out to the maintainers by creating a new issue on the official KleidiAI GitLab before investing significant time in:

Accepted contributions

The following areas are generally suitable for external contributions:

Rejected contributions

The following directories are not open to external contributions and contributions will be rejected without prior maintainer agreement:

KleidiAI does not accept contributions that add support for:

General contribution requirements

All contributions must:

For contributions, a Developer Certificate of Origin (DCO) is required to certify origin. The process is managed by DCO v1.1.

The agreement to the DCO is indicated by a Signed-off-by line in the commit message using your real name and email address:

Signed-off-by: Name <name@example.com>

Contributors are responsible for ensuring their copyright notices are correct. Third party contributors should add their own copyright notice applicable to their own modifications in existing files. For new files, if they include any code copied from existing files, preserve the existing copyright as is (do not modify it in any way - for example changing the year) and amend as required with third party copyright notice. If the file is entirely new and does not contain Arm copyrightable content, there is typically no need to include Arm copyright.

Do not contribute code with unclear provenance and do not include code copied from licenses that are incompatible with KleidiAI distribution. Disclose third-party sources in the merge request.

Micro-kernel contributions

Discuss new micro-kernels with maintainers before implementation. The discussion should cover:

New micro-kernels must:

Getting access and submitting a merge request

Contributions are submitted as GitLab merge requests (MR). The process to submit a MR is:

  1. Create an account on the Arm hosted GitLab instance.
  2. Request project fork permission. See Arm GitLab contribution documentation.
  3. Fork the KleidiAI repository.
  4. Make the smallest coherent change that solves the problem.
  5. Run the relevant tests locally and fix any issues.
  6. Push the patch-set to your forked repository.
  7. Submit a MR on the official KleidiAI GitLab repository with a clear description.

The description of a MR must contain:

Testing requirements

Never skip tests unless there is a clear unavoidable reason.

For normal validation, run one of:

cmake -S . -B build
cmake --build build
build/kleidiai_test
bazelisk test //test:kleidiai_test

The NextGen test framework uses deterministic seeds by default. For new micro-kernels, run with several explicit seeds to cover more generated shapes and values.

Benchmarking and performance evidence

Performance-sensitive contributions must include benchmark evidence. Build and run the benchmark tool as described in benchmark/README.md.

Performance evidence should include:

Use shapes that represent the intended integration use case. When possible, choose shapes from existing model workloads rather than synthetic shapes only.

Examples and documentation

Add a new, or update one of the existing, standalone C++ example application(s) in the examples sub-directory when a change introduces a new concept users of the micro-kernel must understand in order to use the micro-kernel. Examples of when this is needed is when the contribution adds:

Before adding new explanatory text, check whether existing documentation can be referenced instead:

Pre-commit checks

Install and run the configured pre-commit hooks before submitting a merge request:

pre-commit install
pre-commit run --all-files

The hook configuration is in .pre-commit-config.yaml.

If a hook fails, fix the underlying issue rather than bypassing the hook. If a hook is not applicable to a specific change, explain that in the merge request.

Supported environments

KleidiAI support is intentionally bounded. Contributions must preserve support for the environments targeted by the project.

Library C sources must remain C99-compatible, with ACLE and assembly extensions where required for Arm architecture features. C++ code in tests and tooling must remain C++17-compatible unless maintainers agree otherwise.

The project supports CMake 3.16 and Bazel 6.5 or later. Contributions that add files or change build behavior must keep both build systems up to date.

OS / environmentSupported versionsCompiler / toolchainSupported versions / policy
UbuntuCurrent LTS versionsGCCDefault GCC installation versions and all more recent supported releases on gcc.gnu.org
UbuntuCurrent LTS versionsClangDefault Clang installation versions and latest upstream Clang release
UbuntuSupported Ubuntu versions where availableArm Compiler for LinuxAll ACfL releases from the previous 13 months
Windows®Windows releases marked (E) or (W) in Active Support: Windows 11 26H1 E/W, 25H2 E/W, 24H2 E/W, 23H2 EMSVC / Visual Studio®Visual Studio Stable Channel
macOS® operating system softwaremacOS 26, 15, 14Xcode® developer softwareMost recent minor release of the most recent major Xcode release
Android™Android NDKCurrent Android NDK LTS

macOS and Xcode are trademarks of Apple Inc., registered in the U.S. and other countries and regions.
Android is a trademark of Google LLC.
Visual Studio and Windows are trademarks of the Microsoft group of companies.

Review and acceptance process

Once a MR is uploaded, the KleidiAI maintainers will review it and trigger the CI pipeline. Maintainers review merge requests for:

Maintainers may ask for additional explanation or rewriting when the code is hard to review, inconsistent with project conventions, or has unclear origin.

Review comments must be addressed before merge. Keep updates focused and avoid unrelated refactoring while responding to review.

Acceptance of a contribution does not imply acceptance of follow-up work, new support scope, or future micro-kernels in the same area. Discuss major follow-up work with the maintainers.