Decode low-bit weights with Arm SME2 lookup-table instructions
Introduction
Understand why LUTI helps low-bit matrix multiplication
Use LUTI with SME2
Set up the SME2 environment
Compare plain C decoding with SME2 LUTI2
Build and validate the LUTI2 decoding example
Apply LUTI to SME2 matrix kernels
Build and validate the LUTI programming examples
Identify additional LUTI features
Next Steps
Decode low-bit weights with Arm SME2 lookup-table instructions
Introduction
Understand why LUTI helps low-bit matrix multiplication
Use LUTI with SME2
Set up the SME2 environment
Compare plain C decoding with SME2 LUTI2
Build and validate the LUTI2 decoding example
Apply LUTI to SME2 matrix kernels
Build and validate the LUTI programming examples
Identify additional LUTI features
Next Steps
Who is this for?
This is an advanced topic for developers who want to efficiently decode packed low-bit weights inside a Scalable Matrix Extension 2 (SME2) matrix multiplication kernel with lookup-table instructions (LUTIs).
What will you learn?
After completing this Learning Path, you'll be able to perform the following tasks:
- Understand how LUTI2 expands packed 2-bit indices into arithmetic-ready values.
- Compare equivalent low-bit decode paths implemented with plain C and SME2 LUTI2.
- Validate the implementations against a scalar reference and inspect the generated SME2 instructions.
- Apply a repeatable workflow for programming SME2 LUTI.
Prerequisites
Before starting, you'll need the following prerequisites:
- Familiarity with C, AArch64 assembly, quantization, and matrix multiplication
- Understanding of SME2 streaming mode and ZA storage; for more information, see Accelerate matrix multiplication performance with SME2
- A Mac system with Apple silicon (M4 or later), or an Android device with SME2 support
- Make, wget, and LLVM Clang 22 or later for native macOS builds
- For Android builds, a macOS or Linux build host with LLVM Clang 22 or later and Android NDK r29
- For Android execution, an Android 15 or later device with SME2
Summary
This summary was drafted with an approved AI-assisted workflow and reviewed by Arm contributors before publication. Human technical review remains part of the process so the final page reflects engineering rigor, accuracy, and Arm editorial standards.
ZT0, Z registers, and ZA. Next, you’ll configure a macOS or Android environment and compare LUTI2 with scalar decoding. Finally, you’ll apply a four-step programming method to LUTI4 and chained LUTI4-to-LUTI2 examples, then examine additional LUTI feature paths.