Skip to content

Commit 19b1f05

Browse files
authored
Merge pull request #1719 from ArmDeveloperEcosystem/main
Production update
2 parents bca03d9 + 4adb177 commit 19b1f05

File tree

20 files changed

+283
-1033
lines changed

20 files changed

+283
-1033
lines changed

.github/workflows/test-lp.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
ref: ${{ steps.vars.outputs.branch-name }}
1111
- name: Get all changed markdown files
1212
id: changed-markdown-files
13-
uses: tj-actions/changed-files@v44
13+
uses: step-security/changed-files@v45
1414
with:
1515
files: |
1616
**.md

.wordlist.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3705,7 +3705,6 @@ HMMER
37053705
ILP
37063706
IoC
37073707
Jython
3708-
Khrustalev
37093708
LCP
37103709
Maranget
37113710
Minimap
@@ -3872,4 +3871,4 @@ upscalers
38723871
upscales
38733872
upscaling
38743873
vl
3875-
webbot
3874+
webbot

content/learning-paths/cross-platform/pytorch-digit-classification-arch-training/datasets-and-training.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ Make sure to replace 'x' with the version number of Python that you have install
7272

7373
After running the code, you will see output similar to Figure 5:
7474

75-
![image alt-text#center](Figures/01.png "Figure 5. Output".)
75+
![image alt-text#center](Figures/01.png "Figure 5. Output")
7676

7777
## Train the Model
7878

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Build the MNN Command-line ViT Demo
2+
title: Benchmark the Vision Transformer performance with KleidiAI
33
weight: 4
44

55
### FIXED, DO NOT MODIFY
@@ -35,12 +35,16 @@ $ git clone https://github.com/alibaba/MNN.git
3535
$ mkdir build_64 && cd build_64
3636
$ ../build_64.sh "-DMNN_LOW_MEMORY=true -DLLM_SUPPORT_VISION=true -DMNN_KLEIDIAI=true -DMNN_CPU_WEIGHT_DEQUANT_GEMM=true -DMNN_BUILD_LLM=true -DMNN_SUPPORT_TRANSFORMER_FUSE=true -DMNN_ARM82=true -DMNN_OPENCL=true -DMNN_USE_LOGCAT=true -DMNN_IMGCODECS=true -DMNN_BUILD_OPENCV=true"
3737
$ adb push *so llm_demo tools/cv/*so /data/local/tmp/
38-
$ adb shell
3938
```
4039

40+
The Build parameter above ```-DMNN_KLEIDIAI ```is to enable the kleidiAI on the MNN, it can be set to false to disable the KleidiAi.
41+
42+
## Test the performance within/without kleidiAi
43+
4144
Here switch to android adb shell environment.
4245

4346
```shell
47+
$ adb shell
4448
$ cd /data/local/tmp/
4549
$ chmod +x llm_demo
4650
$ export LD_LIBRARY_PATH=./
@@ -73,3 +77,10 @@ prefill speed = 135.29 tok/s
7377
##################################
7478
```
7579
80+
Here is my performance comparation within/without kleidiAI
81+
82+
| | KleidiAI OFF | KleidiAi ON |
83+
|----------|----------|----------|
84+
| Vision Process Time | 5.45s | 5.43 s |
85+
| Prefill Speed | 132.35 tok/s | 148.30 tok/s |
86+
| Decode Speed | 21.61 tok/s | 33.26 tok/s |

content/learning-paths/mobile-graphics-and-gaming/Vision-LLM-inference-on-Android-with-KleidiAI-and-MNN/Build_the_MNN_Android_Demo_with_GUI.md

Lines changed: 8 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Open up a Windows PowerShell or Git Bash and checkout the source tree:
2424
cd C:\Users\$env:USERNAME
2525
git clone https://github.com/HenryDen/MNN.git
2626
cd MNN
27-
git checkout 83b650fc8888d7ccd38dbc68330a87d048b9fe7a
27+
git checkout origin/MNN_commit
2828
```
2929

3030
{{% notice Note %}}
@@ -33,28 +33,15 @@ The app code is currently not merged into the MNN repo. The repo above is a fork
3333

3434
## Build the app using Android Studio
3535

36-
Create a signing.gradle file at android/app with the following template:
37-
```shell
38-
ext{
39-
signingConfigs = [
40-
release: [
41-
storeFile: file('PATH_TO_jks_file'),
42-
storePassword: "****",
43-
keyAlias: "****",
44-
keyPassword: "****"
45-
]
46-
]
47-
}
48-
```
36+
Open Android Studio
4937

50-
If you don't need to compile a release version of the app, you can skip the following step of creating a sign file and write anything in the signing.gradle.
38+
- Navigate to **Open**.
39+
- Browse the folder to the MNN/transformers/llm/engine/android, it will be android icon as picture show,
40+
- Press **OK** to load the android project
41+
- Wait for a while till the Gradle sync finish
5142

52-
- Navigate to **Build -> Generate Signed App Bundle or APK**.
53-
- Select **APK** and click **next**.
54-
- Press **Create new** and fill in the information..
55-
- Fill in the information of the newly generated JKS file in the template above.
43+
![Loading screenshot](open_project.png)
5644

57-
Open the MNN/transformers/llm/engine/android directory with Android Studio and wait for the Gradle project sync to finish.
5845

5946
## Prepare the model
6047
You can download the model from ModelScope : https://www.modelscope.cn/models/qwen/qwen2-vl-2b-instruct
@@ -79,7 +66,7 @@ $ llmexport --path /path/to/mnn-llm/Qwen2-VL-2B-Instruct/ --export mnn --quant_b
7966
- --sym: the quantization parameter, means symmetrical quantization.
8067

8168
## Build and run the app
82-
Before launching the app, you need to push the model into the device manually:
69+
Before launching the app, you need to push the model into the device manually, connect the android device with the host PC with usb, and make sure the USB debugging is enable in the android device:
8370

8471
```shell
8572
$ adb shell mkdir /data/local/tmp/models/
45.9 KB
Loading
Lines changed: 27 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: What is Arm Accuracy Super Resolution (Arm ASR)?
2+
title: What is Arm Accuracy Super Resolution?
33
weight: 2
44

55
### FIXED, DO NOT MODIFY
@@ -8,43 +8,49 @@ layout: learningpathall
88

99
## Introduction
1010

11-
[Arm® Accuracy Super Resolution™ (Arm ASR)](https://www.arm.com/developer-hub/mobile-graphics-and-gaming/accuracy-super-resolution) is a mobile-optimized temporal upscaling technique derived from [AMD's Fidelity Super Resolution 2 v2.2.2](https://github.com/GPUOpen-LibrariesAndSDKs/FidelityFX-SDK/blob/main/docs/techniques/super-resolution-temporal.md). Arm ASR extends this technology with multiple optimizations to make the technique suited for the more resource-constrained environment of mobile gaming.
11+
[Arm® Accuracy Super Resolution™ (Arm ASR)](https://www.arm.com/developer-hub/mobile-graphics-and-gaming/accuracy-super-resolution) is a mobile-optimized temporal upscaling technique derived from [AMD's Fidelity Super Resolution 2 v2.2.2](https://github.com/GPUOpen-LibrariesAndSDKs/FidelityFX-SDK/blob/main/docs/techniques/super-resolution-temporal.md).
1212

13-
Available as an easy plug-in for Unreal Engine 5.3, 5,4, and 5.5, a Unity plugin coming soon, or as a generic library that you can integrate into other engines, you can easily improve frames per second, enhance visual quality, and prevent thermal throttling for smoother, longer gameplay.
13+
Arm ASR extends this technology with optimizations suited to the resource-constrained environment of mobile gaming.
14+
15+
Arm ASR is currently available as an easy-to-integrate plug-in for Unreal Engine versions 5.3, 5.4, and 5.5, with a Unity plugin coming soon. It is also available as a generic library that you can integrate into other engines.
16+
17+
Using ASR, you can improve frames per second (FPS), enhance visual quality, and prevent thermal throttling for smoother and longer gameplay.
1418

1519
## What is Super Resolution?
1620

17-
Super-resolution techniques render some frames at a lower resolution and use shader upscaling to reconstruct how the frames should look at native resolution. This offers significant performance and battery life improvements for mobile devices.
21+
Super Resolution techniques render frames at a lower resolution and apply shader-based upscaling to reconstruct how the frames should look at native resolution. This approach significantly improves performance and extends battery life on mobile devices.
1822

1923
Arm ASR outperforms spatial upscalers when reconstructing fine details, such as:
2024

21-
- Thin features
22-
- Grid-like structures
23-
- Fast-moving objects
25+
- Thin features.
26+
- Grid-like structures.
27+
- Fast-moving objects.
2428

25-
You can control a range of different settings for Arm ASR:
29+
You have control over a range of different settings, including:
2630

27-
- The upscaling ratio. For example, a value of 50.0 will mean that the plugin upscales frames by a factor of 2.
28-
- Use Arm ASR’s own auto-exposure or use the game engine’s auto-exposure value.
29-
- Use a Robust Contrast Adaptive Sharpening (RCAS) filter to sharpen the output image.
30-
- The shader quality preset: 1 - Quality, 2 - Balanced, 3 - Performance.
31+
- **The upscaling ratio**. For example, a value of 50.0 indicates that the plugin upscales frames by a factor of 2.
32+
- **Auto-exposure**. Use Arm ASR’s own auto-exposure or use your game engine’s auto-exposure value.
33+
- **Sharpening**. Apply Robust Contrast Adaptive Sharpening (RCAS) filters to enhance output image clarity.
34+
- **Shader quality presets**. Select from: 1 - Quality, 2 - Balanced, or 3 - Performance presets.
3135

3236
## Overview of Arm ASR
3337

34-
The [Arm ASR experience kit](https://github.com/arm/accuracy-super-resolution) is a combination of materials that provide access to the technology, to help you evaluate it and make the best use of it. It includes:
38+
The [Arm ASR Experience Kit](https://github.com/arm/accuracy-super-resolution) provides resources to help you evaluate and effectively utilize this technology.
39+
40+
It includes:
3541

36-
- The Arm ASR source code so developers can access it fully and even evolve the technology for their needs.
37-
- Tutorials and sample materials to help developers with the integration of the technology and how to use it.
38-
- Plugin for Unreal Engine.
42+
- Arm ASR source code, which provides developers with the full access and the flexibility to evolve the technology for their needs.
43+
- Tutorials and sample materials to simplify integration and usage.
44+
- Plugin support for Unreal Engine.
3945

4046
## Unreal Engine Plugin
4147

42-
The Unreal Engine 5 plugin can be integrated into your project in a matter of minutes. Once installed, simply enable temporal upscaling on your project and the plugin will automatically handle the upscaling of all frames.
48+
The Arm ASR plugin for Unreal Engine 5 integrates into your project within minutes. Once installed, simply enable temporal upscaling, and the plugin automatically handles frame upscaling.
4349

44-
[Using Arm ASR in Unreal Engine](../03-ue)
50+
See [Using Arm ASR in Unreal Engine](../03-ue).
4551

46-
## Custom engine usage
52+
## Custom Engine Usage
4753

48-
If you are using your own custom engine, you can still integrate Arm ASR using our generic library.
54+
If you are using your own custom engine, integrate Arm ASR using our generic library.
4955

50-
[Using Arm ASR in a custom engine](../04-generic_library)
56+
See [Using Arm ASR in a custom engine](../04-generic_library).

content/learning-paths/mobile-graphics-and-gaming/get-started-with-arm-asr/02-ue.md

Lines changed: 52 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -7,87 +7,104 @@ layout: learningpathall
77
---
88

99

10-
## Introduction
10+
## Objective
1111

12-
This guide describes how to get started with Arm® Accuracy Super Resolution™ (Arm ASR) through an example project in Unreal Engine. It is for Unreal Engine developers who want to apply upscaling techniques to their projects. You will walk through the processes of installing Arm ASR and some of the common tasks that you might encounter when setting up Arm ASR for the first time.
12+
This Learning Path describes how to get started with Arm® Accuracy Super Resolution™ (Arm ASR) using an example project in Unreal Engine.
13+
14+
It is for Unreal Engine developers who want to apply upscaling techniques to their projects.
15+
16+
You will walk through the processes of installing Arm ASR performing some of the common setup tasks.
1317

1418
## Before you begin
1519

16-
We recommend using Unreal Engine versions 5.3-5.5 through this tutorial. Please get in contact with us at [email protected] if you have any questions.
20+
It is recommended that you use Unreal Engine versions 5.3-5.5 through this tutorial.
21+
22+
If you have any questions, contact us at [email protected].
1723

1824
## Installing the Arm ASR plugin
1925

20-
The following steps describe how to install the Arm ASR plugin in Unreal Engine:
26+
Follow these steps to install the Arm ASR plugin in Unreal Engine:
2127

22-
1. Open the Unreal Engine project you intend to use with Arm ASR. The Third Person pack is available as an example.
28+
1. Open the Unreal Engine project you plan to use with Arm ASR.
2329

24-
![Third person pack](images/third_person_pack.png "Third person pack")
30+
The Third Person pack is available as an example, see below:
2531

26-
2. Download the plugin by cloning the repository.
32+
![Third Person pack](images/third_person_pack.png "Third Person pack")
33+
34+
2. Download the Arm ASR plugin by cloning the repository:
2735

2836
```
2937
git clone https://github.com/arm/accuracy-super-resolution-for-unreal
3038
```
3139
32-
3. Navigate to the `UE` directory in the cloned repository. This contains directories containing the plugin for each supported version of Unreal Engine.
40+
3. Navigate to the `UE` directory in the cloned repository.
41+
42+
This directory contains subfolders with plugins for each supported Unreal Engine version.
3343
34-
4. From the directory for your version of Unreal Engine, copy the Arm ASR plugin into the `Plugins` folder in the game directory.
44+
4. From the directory for your version of Unreal Engine, copy the Arm ASR plugin into the `Plugins` folder in the game directory.
3545
36-
![Plugin folder](images/plugin_folder.png "Plugin folder")
46+
See below:
3747
38-
![Copied Arm ASR plugin](images/copied_arm_asr_plugin.png "Copied Arm ASR plugin")
48+
![Plugin folder](images/plugin_folder.png "Plugin folder")
49+
50+
![Copied Arm ASR plugin](images/copied_arm_asr_plugin.png "Copied Arm ASR plugin")
3951
4052
5. Navigate back to your Unreal Engine project.
4153
42-
6. When the pop-up window opens asking to build Arm ASR, select **Yes**.
54+
6. When the pop-up window opens prompting you to build Arm ASR, select **Yes**.
4355
44-
![Arm ASR pop up window](images/asr_popup.png "Arm ASR pop up window")
56+
![Arm ASR pop-up window](images/asr_popup.png "Arm ASR pop-up window")
4557
4658
## Enable and configure Arm ASR
4759
48-
After reopening the Unreal Engine project, the Arm ASR plugin should be enabled.
60+
After reopening the Unreal Engine project, ensure that the Arm ASR plugin is enabled.
4961
50-
1. Go to **Edit > Plugins**, and search for Arm ASR. Make sure Arm ASR is checked.
62+
1. Go to **Edit > Plugins**, search for **Arm ASR**, and make sure that it is checked.
5163
5264
![Verify the plugin](images/verify_plugin.png "Verify the plugin")
5365
5466
![Plugin screen](images/plugin_screen.png "Plugin screen")
5567
56-
1. To enable Arm ASR upscaling, open **Project Settings** and change the Anti-Aliasing Method to **Temporal Anti-Aliasing**.
68+
2. To enable Arm ASR upscaling, open **Project Settings** and set the **Anti-Aliasing Method** to **Temporal Anti-Aliasing**.
5769
58-
{{% notice %}}
59-
**Mobile Anti-Aliasing Method** is used for the mobile renderer, however this tutorial describes the desktop renderer. You can learn about other available renderers by studying the `README.md` of the `accuracy-super-resolution-for-unreal` repository.
60-
{{% /notice %}}
70+
{{%notice%}}
71+
**Mobile Anti-Aliasing Method** is used for the mobile renderer, however this Learning Path uses the desktop renderer. For information about other available renderers, see the `README.md` in the `accuracy-super-resolution-for-unreal` repository.
72+
{{%/notice%}}
6173
62-
![Change anti-aliasing method](images/change_anti_aliasing_method.png "Change anti-aliasing method")
74+
![Change Anti-Aliasing Method](images/change_anti_aliasing_method.png "Set the Anti-Aliasing Method")
6375
64-
1. To check that Arm ASR is enabled and working, use the `ShowFlag.VisualizeTemporalUpscaler 1` console command. If Arm ASR is working, you will see Arm ASR listed as the **ThirdParty TemporalUpscaler** in the command window.
76+
3. To verify that Arm ASR is enabled and active, use the `ShowFlag.VisualizeTemporalUpscaler 1` console command.
77+
78+
{{%notice%}}
79+
The debug views produced by this command are generated by Unreal Engine's TAA, not directly by Arm ASR.{{%/notice%}}
6580
66-
{{% notice %}}
67-
When you use the `ShowFlag.VisualizeTemporalUpscaler 1` console command, the debug views are not generated from Arm ASR but from Unreal Engines TAA.
68-
{{% /notice %}}
81+
If Arm ASR is active, you will see Arm ASR listed as the **ThirdParty TemporalUpscaler** in the console window.
6982
70-
![Visualize console command](images/visualise_console_command.png "Visualize console command")
83+
![Visualize console command](images/visualise_console_command.png "Visualize console command")
7184
72-
1. If Arm ASR is not shown here, use the `r.ArmASR.Enable 1` console command to enable upscaling.
85+
4. If Arm ASR is not shown here, use the `r.ArmASR.Enable 1` console command to enable upscaling.
7386
7487
![Arm ASR.Enable 1 command](images/arm_asr_enable_command.png "ArmASR.Enable 1 command")
7588
76-
## Further configuration {.section}
89+
## Further configuration settings
90+
91+
You can configure Arm ASR further in two ways:
7792
78-
There are two ways to configure further settings.
93+
1. Using the UI:
7994
80-
Option 1 is using the UI. Go to **Edit > Project Settings > Plugins > Arm ASR**.
95+
* Go to **Edit > Project Settings > Plugins > Arm ASR**.
8196
8297
![Configure settings using UI](images/ui_settings.png "Configure settings using UI")
8398
84-
Option 2 is through the console. By typing `r.ArmASR.` into the console window, you can see the configuration options.
99+
2. Through the console:
100+
101+
* Type `r.ArmASR.` into the console window to see configuration options.
85102
86103
![Configuration options](images/configuration_options.png "Configuration options")
87104
88-
For example, you can change the upscaling ratio by modifying the **ScreenPercentage**, via the command option `r.ScreenPercentage`. A value of `50.0` will mean that the plugin upscales frames by a factor of 2.
105+
For example, you can change the upscaling ratio by modifying the **ScreenPercentage**, through the command option `r.ScreenPercentage`. A value of `50.0` means frames are upscaled by a factor of 2.
89106
90-
Arm ASR's behavior can be configured via the following plugin-specific console variables:
107+
You can configure Arm ASR's behavior through the following plugin-specific console variables:
91108
92109
|Console Variable | Default Value | Value Range | Details |
93110
|:------------------------------------------------- | :------------ | :---------- | :----------------------------------------------------------------------------------------------------- |
@@ -112,4 +129,6 @@ Arm ASR's behavior can be configured via the following plugin-specific console v
112129
113130
## Next steps
114131
115-
You are now ready to use Arm ASR in your Unreal Engine projects. You can use [Arm Performance Studio](https://developer.arm.com/Tools%20and%20Software/Arm%20Performance%20Studio) tools to measure the performance of your game as it runs on a mobile device, allowing you to monitor the effect of Arm ASR.
132+
You are now ready to use Arm ASR in your Unreal Engine projects.
133+
134+
You can use [Arm Performance Studio](https://developer.arm.com/Tools%20and%20Software/Arm%20Performance%20Studio) tools to measure the performance of your game as it runs on a mobile device, allowing you to monitor the effect of Arm ASR.

0 commit comments

Comments
 (0)