Skip to content

Commit 130cc49

Browse files
Merge branch 'ArmDeveloperEcosystem:main' into codex
2 parents 444ffbc + b9cd8d6 commit 130cc49

33 files changed

Lines changed: 1124 additions & 42 deletions

.wordlist.txt

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5439,4 +5439,38 @@ snapshotter
54395439
unmounting
54405440
vnd
54415441
xqcqqYHrjZ
5442-
ztPjILBCbFEqnVlbvjUpM
5442+
ztPjILBCbFEqnVlbvjUpM
5443+
ArmKleidiAI
5444+
DirectML
5445+
DotProd
5446+
GIMPLE
5447+
GemV
5448+
LinkTimeOptimization
5449+
MIGraphX
5450+
MLAS
5451+
MLSA
5452+
MOPA
5453+
MTK
5454+
MatMul
5455+
MlasConv
5456+
MlasDynamicQGemmBatch
5457+
MlasGemmBatch
5458+
Modescope
5459+
Nascimento
5460+
ParallemOpenMP
5461+
Partitioner
5462+
QNN
5463+
SPECint
5464+
SequentialExecutor
5465+
Specint
5466+
agentically
5467+
denoises
5468+
discoverable
5469+
gentoo
5470+
imatmul
5471+
jenkins
5472+
mopa
5473+
perfetto
5474+
translational
5475+
tunable
5476+
vlx

content/install-guides/gemini.md

Lines changed: 35 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
---
22
title: Gemini CLI
33

4-
draft: true
5-
64
author: Jason Andrews
75
minutes_to_complete: 15
86
official_docs: https://ai.google.dev/gemini-api/docs/cli
@@ -82,11 +80,11 @@ Benefits of using Vertex AI:
8280

8381
## How do I install Gemini CLI on macOS?
8482

85-
The easiest way to install Gemini CLI on macOS is using Homebrew, which handles all dependencies automatically.
83+
The easiest way to install Gemini CLI on macOS is using Homebrew, which handles all dependencies.
8684

8785
### Install Gemini CLI on macOS using Homebrew
8886

89-
Yes, you can install [Homebrew](https://brew.sh/) if it isn't already available on your computer.
87+
You can install [Homebrew](https://brew.sh/) if it isn't already available on your computer.
9088

9189
Install Gemini CLI using Homebrew:
9290

@@ -98,7 +96,7 @@ This installs Gemini CLI and automatically handles the Node.js dependency. The H
9896

9997
### Install Gemini CLI on macOS using npm
10098

101-
Yes, if you prefer to use npm or need the latest version, you can install Gemini CLI globally using npm.
99+
If you prefer to use npm or need the latest version, you can install Gemini CLI globally using npm.
102100

103101
First, make sure you have Node.js version 20 or higher installed. Install Node.js using Homebrew:
104102

@@ -112,7 +110,7 @@ Verify Node.js is installed correctly:
112110
node --version
113111
```
114112

115-
The output should show version 20 or higher:
113+
The output is similar to:
116114

117115
```output
118116
v25.2.1
@@ -124,7 +122,7 @@ Install Gemini CLI globally using npm:
124122
npm install -g @google/gemini-cli
125123
```
126124

127-
This installs the latest version (for example, 0.20.0) directly from npm. Homebrew can lag behind npm, so versions may differ.
125+
This installs the latest version, such as 0.23.0, directly from npm. Homebrew can lag behind npm, so versions might differ.
128126

129127
### How do I confirm Gemini CLI is working on macOS?
130128

@@ -136,10 +134,10 @@ Confirm the CLI is available by checking the version:
136134
gemini --version
137135
```
138136

139-
The output shows the version:
137+
The output is similar to:
140138

141139
```output
142-
0.20.0
140+
0.23.0
143141
```
144142

145143
Start an interactive session to test basic functionality:
@@ -164,7 +162,7 @@ Install the required packages on Ubuntu/Debian systems:
164162
sudo apt update && sudo apt install -y curl
165163
```
166164

167-
If you are not using Ubuntu/Debian use your package manager to install curl.
165+
If you're not using Ubuntu/Debian, use your package manager to install curl.
168166

169167
### How do I install Node.js on Arm Linux?
170168

@@ -194,7 +192,7 @@ Verify npm is available:
194192
npm --version
195193
```
196194

197-
The output shows the npm version:
195+
The output is similar to:
198196

199197
```output
200198
10.2.4
@@ -225,7 +223,7 @@ gemini --version
225223
The output shows the version:
226224

227225
```output
228-
0.20.0
226+
0.23.0
229227
```
230228

231229
### How do I view the available command-line options?
@@ -361,7 +359,7 @@ You may have other objects already in the file so make sure to use a `,` at the
361359
"run",
362360
"--rm",
363361
"-i",
364-
"-v", "/Users/yourname01/yourlocalcodebase:/workspace",
362+
"-v", "$HOME/workspace:/workspace",
365363
"--name", "arm-mcp",
366364
"armlimited/arm-mcp:latest"
367365
],
@@ -382,14 +380,33 @@ Start the Gemini CLI and list the tools from the MCP server to verify it's worki
382380
gemini
383381
```
384382

385-
Use the `/tools` command to list the available tools:
383+
The output shows the MCP server.
384+
385+
```output
386+
Using: 1 GEMINI.md file | 1 MCP server
387+
```
388+
389+
Use the `/mcp` command to list the available tools:
386390

387391
```console
388-
/tools
392+
/mcp
389393
```
390394

391-
You should see the Arm MCP server tools listed in the output. If the arm-mcp server says it's still loading, wait a moment and run `/tools` again.
395+
The Arm MCP server tools are listed in the output.
396+
397+
```output
398+
Configured MCP servers:
399+
400+
🟢 arm_mcp_server - Ready (6 tools)
401+
Tools:
402+
- check_image
403+
- knowledge_base_search
404+
- mca
405+
- migrate_ease_scan
406+
- skopeo
407+
- sysreport_instructions
408+
```
392409

393-
If you're facing issues or have questions, reach out to mcpserver@arm.com .
410+
If you're facing issues or have questions, reach out to mcpserver@arm.com.
394411

395-
You're ready to use the Gemini CLI.
412+
You're now ready to use Gemini CLI with the Arm MCP server for Arm-specific development assistance.

content/learning-paths/mobile-graphics-and-gaming/_index.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ key_ip:
99
- Mali
1010
maintopic: true
1111
operatingsystems_filter:
12-
- Android: 33
13-
- Linux: 33
14-
- macOS: 14
12+
- Android: 35
13+
- Linux: 35
14+
- macOS: 15
1515
- Windows: 14
1616
subjects_filter:
1717
- Gaming: 6
1818
- Graphics: 6
19-
- ML: 16
20-
- Performance and Architecture: 35
19+
- ML: 17
20+
- Performance and Architecture: 36
2121
subtitle: Optimize Android apps and build faster games using cutting-edge Arm tech
2222
title: Mobile, Graphics, and Gaming
2323
tools_software_languages_filter:
@@ -35,20 +35,21 @@ tools_software_languages_filter:
3535
- Bazel: 1
3636
- C: 5
3737
- C#: 3
38+
- C++: 1
3839
- CCA: 1
3940
- Clang: 12
4041
- CMake: 2
41-
- CPP: 14
42+
- CPP: 15
4243
- Docker: 1
43-
- ExecuTorch: 3
44+
- ExecuTorch: 4
4445
- Frame Advisor: 1
4546
- GCC: 12
4647
- Generative AI: 2
4748
- Godot: 1
4849
- Google Pixel 8: 1
4950
- Google Test: 1
5051
- Halide: 1
51-
- Hugging Face: 5
52+
- Hugging Face: 6
5253
- Java: 6
5354
- Jupyter Notebook: 1
5455
- KleidiAI: 2
@@ -62,8 +63,9 @@ tools_software_languages_filter:
6263
- MTE: 2
6364
- NEON: 1
6465
- ONNX Runtime: 1
66+
- ONNX runtime: 1
6567
- OpenGL ES: 1
66-
- Python: 7
68+
- Python: 8
6769
- PyTorch: 2
6870
- QEMU: 1
6971
- RenderDoc: 1

content/learning-paths/mobile-graphics-and-gaming/build-llama3-chat-android-app-using-executorch-and-xnnpack/6-build-android-chat-app.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ In this section, you will use a Android demo application to demonstrate local in
1717
``` bash
1818
export ANDROID_NDK=$ANDROID_HOME/ndk/29.0.14206865/
1919
export ANDROID_ABI=arm64-v8a
20+
export ANDROID_SDK=$ANDROID_HOME
2021
```
2122

2223
{{% notice Note %}}
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
---
2+
title: Unleashing SME2 Performance - Profile ONNX models with KleidiAI-Optimized ONNX Runtime
3+
4+
draft: true
5+
cascade:
6+
draft: true
7+
8+
minutes_to_complete: 40
9+
10+
who_is_this_for: This is an advanced topic for software developers, performance engineers, and AI practitioners
11+
12+
learning_objectives:
13+
- Build ONNX runtime library with KleidiAI and SME2 support
14+
- Profile performance of ONNX models
15+
- Learn how KleidiAI and SME2 accelerates ONNX operators
16+
17+
prerequisites:
18+
- Knowledge of KleidiAI and SME2
19+
- An Android device with Arm SME2 support
20+
21+
author: Zenon Zhilong Xiu
22+
23+
### Tags
24+
skilllevels: Advanced
25+
subjects: ML
26+
armips:
27+
- Arm C1 CPU
28+
- Arm SME2 unit
29+
tools_software_languages:
30+
- C++
31+
- ONNX runtime
32+
operatingsystems:
33+
- Android
34+
- Linux
35+
36+
37+
38+
further_reading:
39+
- resource:
40+
title: part 1 Arm Scalable Matrix Extension Introduction
41+
link: https://developer.arm.com/community/arm-community-blogs/b/architectures-and-processors-blog/posts/arm-scalable-matrix-extension-introduction
42+
type: blog
43+
- resource:
44+
title: part 2 Arm Scalable Matrix Extension Instructions
45+
link: https://developer.arm.com/community/arm-community-blogs/b/architectures-and-processors-blog/posts/arm-scalable-matrix-extension-introduction-p2
46+
type: blog
47+
- resource:
48+
title: part4 Arm SME2 Introduction
49+
link: https://developer.arm.com/community/arm-community-blogs/b/architectures-and-processors-blog/posts/part4-arm-sme2-introduction
50+
type: blog
51+
52+
53+
54+
### FIXED, DO NOT MODIFY
55+
# ================================================================================
56+
weight: 1 # _index.md always has weight of 1 to order correctly
57+
layout: "learningpathall" # All files under learning paths have this same wrapper
58+
learning_path_main_page: "yes" # This should be surfaced when looking for related content. Only set for _index.md of learning path content.
59+
---
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
# ================================================================================
3+
# FIXED, DO NOT MODIFY THIS FILE
4+
# ================================================================================
5+
weight: 21 # The weight controls the order of the pages. _index.md always has weight 1.
6+
title: "Next Steps" # Always the same, html page title.
7+
layout: "learningpathall" # All files under learning paths have this same wrapper for Hugo processing.
8+
---
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
---
2+
title: Build ONNX Runtime with KleidiAI and SME2 for Android
3+
weight: 4
4+
5+
### FIXED, DO NOT MODIFY
6+
layout: learningpathall
7+
---
8+
9+
## Build ONNX Runtime and benchmark application with KleidiAI and SME2 support for Android
10+
11+
To run this on an Android device, you must cross-compile ORT using the Android NDK.
12+
13+
Prerequisites:
14+
- Android NDK: Version r26b or newer (r27+ recommended for latest SME2 toolchain support).
15+
- CMake & Ninja: Ensure these are in your system PATH.
16+
17+
### Build `onnxruntime`
18+
19+
First, clone the [ONNX Runtime](https://github.com/microsoft/onnxruntime).
20+
21+
Then run the following from the root of the ONNX Runtime repository:
22+
```bash
23+
./build.sh --android --android_sdk_path $ANDROID_NDK_HOME --android_ndk_path $ANDROID_NDK_HOME --android_abi arm64-v8a --android_api 27 --config RelWithDebInfo --build_shared_lib --cmake_extra_defines onnxruntime_USE_KLEIDIAI=ON --cmake_generator Ninja --parallel
24+
```
25+
26+
Note: The flag `onnxruntime_USE_KLEIDIAI=ON` triggers the inclusion of Arm KleidiAI kernels into the MLAS library.
27+
28+
## Profiling Performance with onnxruntime_perf_test
29+
Once the build is complete, you will find the `libonnxruntime.so` shared library and `onnxruntime_perf_test` binary in your build directory.
30+
31+
`onnxruntime_perf_test` is essential for measuring latency and identifying bottlenecks of an ONNX model (named `<your_model>.onnx` hereafter).
32+
33+
### Step 1: Push files to Android Device
34+
```bash
35+
adb push <build_dir>/Android/RelWithDebInfo/onnxruntime_perf_test /data/local/tmp/
36+
adb push <build_dir>/Android/RelWithDebInfo/libonnxruntime.so /data/local/tmp/
37+
adb push <your_model>.onnx /data/local/tmp/
38+
```
39+
40+
### Step 2: Run the Performance Test
41+
The `onnxruntime_perf_test` tool allows you to simulate inference and gather statistics. For example,
42+
```bash
43+
# Execute on the device
44+
adb shell "/data/local/tmp/onnxruntime_perf_test -e cpu -m times -r 20 -s -Z -x 1 /data/local/tmp/<your_model>.onnx"
45+
```
46+
47+
The command example set the arguments of the application as,
48+
- `-e cpu` specifies the provider as cpu provider
49+
- `-m times` specifies the test mode as “times”
50+
- `-r 20` specifies the repeated times as 20
51+
- `-Z` disallows thread from spinning during runs to reduce cpu usage
52+
- `-s` shows statistics result
53+
- `-x 1` sets the number of threads used to parallelize the execution within nodes as 1
54+
55+
You can try other arguments setting if you would like to.
56+
57+
### Step 3: Deep Dive into Operator Profiling
58+
To see exactly how many milliseconds are spent on each operator, use the profiling flag `-p`.
59+
```bash
60+
adb shell "/data/local/tmp/onnxruntime_perf_test -p profile.json -e cpu -m times -r 5 -s -Z -x 1 /data/local/tmp/<your_model>.onnx"
61+
adb pull /data/local/tmp/profile.json
62+
```
63+
64+
The argument `-p` enables performance profiling during the benchmark run. When you provide this flag followed by a filename, ONNX Runtime will generate a JSON file containing a detailed trace of the model execution.
65+
You can view the results by opening [perfetto tool]( https://ui.perfetto.dev/), and loading the generated JSON file. This allows you to see a visual timeline of which operations took the most time.
66+
You also can convert the JSON file to a CSV sheet by creating a python script.
21.4 KB
Loading
20.7 KB
Loading
831 KB
Loading

0 commit comments

Comments
 (0)