You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: i18n/en/docusaurus-plugin-content-docs/current/common/ai/_aimet.mdx
+19-19Lines changed: 19 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,13 @@
1
1
[AIMET](https://github.com/quic/aimet) (AI Model Efficiency Toolkit) is a quantization tool for deep learning models such as PyTorch and ONNX. AIMET enhances the performance of deep learning models by reducing computational load and memory usage.
2
2
3
-
With AIMET, developers can quickly iterate to find the optimal quantization configuration, achieving the best balance between accuracy and latency. Developers can compile and deploy quantized models exported from AIMET on Qualcomm NPUs using [QAIRT](./qairt-usage), or run them directly with ONNX-Runtime.
3
+
With AIMET, developers can quickly iterate to find the optimal quantization configuration that balances accuracy and latency. The quantized models exported by AIMET can be compiled and deployed on Qualcomm NPUs using [QAIRT](./qairt-usage), or run directly with ONNX-Runtime.
4
4
5
5
AIMET helps developers with:
6
6
7
7
-**Quantization simulation**
8
8
-**Model quantization using Post-Training Quantization (PTQ) techniques**
9
9
-**Quantization-Aware Training (QAT) on PyTorch models using AIMET-Torch**
10
-
-**Visualizing and experimenting with the impact of activation values and weights on model accuracy at different precisions**
10
+
-**Visualizing and experimenting with the impact of different precision settings on activation values and weights**
11
11
-**Creating mixed-precision models**
12
12
-**Exporting quantized models to deployable ONNX format**
13
13
@@ -32,12 +32,12 @@ AIMET requires a Python 3.10 environment, which can be created using [Anaconda](
32
32
33
33
:::tip
34
34
35
-
- For Anaconda installation, refer to: [**Conda Install**](../virtual-env/conda_install)
35
+
- For Anaconda installation, refer to: [**Conda Installation**](../virtual-env/conda_install)
36
36
37
-
- For creating a conda Python environment, refer to: [**Create Environment with Specific Python Version**](../virtual-env/conda_use#create-environment-with-specific-python-version)
37
+
- For creating a conda Python environment, refer to: [**Creating a Specific Python Version Environment**](../virtual-env/conda_use#creating-a-specific-python-version-environment)
38
38
:::
39
39
40
-
After installing Anaconda, create and activate a Python 3.10 environment using the terminal:
40
+
After installing Anaconda, use the terminal to create and activate a Python 3.10 environment
41
41
42
42
<NewCodeBlocktip="X86 Linux PC"type="PC">
43
43
@@ -62,7 +62,7 @@ AIMET provides two Python packages:
62
62
63
63
</NewCodeBlock>
64
64
65
-
-**AIMET-Torch**: Perform QAT on PyTorch models
65
+
-**AIMET-Torch**: Performs QAT on PyTorch models
66
66
67
67
<NewCodeBlocktip="X86 Linux PC"type="PC">
68
68
@@ -74,7 +74,7 @@ AIMET provides two Python packages:
74
74
75
75
- Install jupyter-notebook
76
76
77
-
AIMET examples are provided as **jupyter-notebook** references. You need to install the jupyter kernel for the aimet Python environment.
77
+
AIMET examples are provided as **jupyter-notebooks**, so we need to install jupyter kernel for the aimet Python environment
78
78
79
79
<NewCodeBlocktip="X86 Linux PC"type="PC">
80
80
@@ -87,11 +87,11 @@ AIMET provides two Python packages:
87
87
88
88
## AIMET Usage Example
89
89
90
-
This example demonstrates PTQ (Post-Training Quantization) using the PyTorch[ResNet50](https://docs.pytorch.org/vision/main/models/generated/torchvision.models.resnet50.html) object detection model, which is first converted to ONNX format and then quantized using AIMET-ONNX.
91
-
For implementation details, please refer to the ResNet50 example [**notebook**](https://github.com/ZIFENG278/resnet50_qairt_example/blob/main/notebook/quantsim-resnet50.ipynb).
90
+
This example uses PyTorch's [resnet50](https://docs.pytorch.org/vision/main/models/generated/torchvision.models.resnet50.html) object detection model, converting it to ONNX format and then performing PTQ quantization using AIMET-ONNX.
91
+
For implementation details, please refer to the resnet50 example [**notebook**](https://github.com/ZIFENG278/resnet50_qairt_example/blob/main/notebook/quantsim-resnet50.ipynb)
92
92
93
93
:::tip
94
-
The model exported in this example can be used for NPU porting of AIMET quantized models in the [**QAIRT SDK Usage Example**](./qairt-usage#quantizing-models-with-aimet).
94
+
The model exported in this example can be used in the [**QAIRT SDK Example**](./qairt-usage#using-aimet-for-model-quantization) for NPU porting of the AIMET quantized model.
Prepare a calibration dataset. To reduce download time, we'll use [ImageNet-Mini](https://www.kaggle.com/datasets/ifigotin/imagenetmini-1000) as a substitute for the full [ImageNet](https://image-net.org/download.php) dataset.
132
+
Prepare a calibration dataset. To reduce download time, we'll use [ImageNet-Mini](https://www.kaggle.com/datasets/ifigotin/imagenetmini-1000) as a substitute for [ImageNet](https://image-net.org/download.php).
133
133
134
134
- Download the ImageNet-Mini dataset from [Kaggle](https://www.kaggle.com/datasets/ifigotin/imagenetmini-1000)
135
135
136
-
### Run the Example Notebook
136
+
### Execute the Example Notebook
137
137
138
138
#### Start jupyter-notebook
139
139
@@ -147,14 +147,14 @@ jupyter-notebook
147
147
</NewCodeBlock>
148
148
149
149
:::tip
150
-
After starting jupyter-notebook, it will automatically open in your default browser. If it doesn't open automatically, click on the URL printed in the terminal.
150
+
After starting jupyter-notebook, it will automatically open in your default browser. If it doesn't open automatically, you can click on the URL printed after startup.
151
151
:::
152
152
153
-
#### Change the Kernel
153
+
#### Change Kernel
154
154
155
155
On the jupyter-notebook homepage, select `/Examples/onnx/quantization/quantsim-resnet50.ipynb`
156
156
157
-
In the notebook's menu bar at the top left, select `Kernel -> Change Kernel -> Select Kernel` and choose the `aimet` kernel created during the [AIMET installation](#aimet-installation).
157
+
In the notebook's top-left menu bar, select `Kernel -> Change Kernel -> Select Kernel` and choose the `aimet` kernel created during [AIMET installation](#install-aimet).
158
158
159
159
<divstyle={{ textAlign: "center" }}>
160
160
<img
@@ -174,7 +174,7 @@ DATASET_DIR = '<ImageNet-Mini Path>' # Please replace this with a real director
174
174
175
175
#### Run the Entire Notebook
176
176
177
-
In the notebook's menu bar at the top left, select `Run -> Run All Cells` to execute the entire notebook.
177
+
In the notebook's top-left menu bar, select `Run -> Run All Cells` to execute the entire notebook.
This document describes how to use the [QAI AppBuilder](../qai-appbuilder) Python API to run inference with the [AOT-GAN](https://aihub.qualcomm.com/models/aotgan) image inpainting model on Qualcomm® Hexagon™ Processor (NPU).
2
+
3
+
**Supported Devices**
4
+
5
+
| Device | SoC |
6
+
| --------------------- | ------- |
7
+
| Fogwise® AIRbox Q900 | QCS9075 |
8
+
9
+
## Install QAI AppBuilder
10
+
11
+
:::tip
12
+
13
+
1. Please install QAI AppBuilder according to the [**QAI AppBuilder Installation Guide**](../qai-appbuilder).
14
+
15
+
2. Configure QAIRT environment variables as described in [**Configure QAIRT Environment Variables**](../qai-appbuilder#configure-qairt-environment-variables).
/prj/qct/webtech_scratch20/mlg_user_admin/qaisw_source_repo/rel/qairt-2.37.1/point_release/SNPE_SRC/avante-tools/prebuilt/dsp/hexagon-sdk-5.5.5/ipc/fastrpc/rpcmem/src/rpcmem_android.c:38:dummy call to rpcmem_init, rpcmem APIs will be used from libxdsprpc
85
+
0.0ms [WARNING] <W> This META does not have Alloc2 Support
86
+
87
+
0.0ms [WARNING] <W> This META does not have Alloc2 Support
88
+
89
+
0.0ms [WARNING] <W> This META does not have Alloc2 Support
90
+
91
+
0.0ms [WARNING] <W> This META does not have Alloc2 Support
92
+
93
+
136.6ms [WARNING] Time: Read model file to memory. 21.49
94
+
95
+
0.0ms [WARNING] <W> This META does not have Alloc2 Support
96
+
97
+
0.0ms [WARNING] <W> This META does not have Alloc2 Support
98
+
99
+
0.0ms [WARNING] <W> This META does not have Alloc2 Support
100
+
101
+
0.0ms [WARNING] <W> This META does not have Alloc2 Support
102
+
103
+
0.0ms [WARNING] <W> This META does not have Alloc2 Support
104
+
105
+
0.0ms [WARNING] <W> This META does not have Alloc2 Support
106
+
107
+
0.0ms [WARNING] <W> This META does not have Alloc2 Support
0.0ms [WARNING] <W> This META does not have Alloc2 Support
118
+
119
+
0.0ms [WARNING] <W> This META does not have Alloc2 Support
120
+
121
+
/usr/bin/xdg-open: 882: www-browser: not found
122
+
/usr/bin/xdg-open: 882: links2: not found
123
+
/usr/bin/xdg-open: 882: elinks: not found
124
+
/usr/bin/xdg-open: 882: links: not found
125
+
0.0ms [WARNING] <W> This META does not have Alloc2 Support
126
+
127
+
0.0ms [WARNING] <W> This META does not have Alloc2 Support
128
+
129
+
/usr/bin/xdg-open: 882: lynx: not found
130
+
/usr/bin/xdg-open: 882: w3m: not found
131
+
xdg-open: no method available for opening '/tmp/tmpjvwp3wzi.PNG'
132
+
/usr/bin/xdg-open: 882: www-browser: not found
133
+
/usr/bin/xdg-open: 882: links2: not found
134
+
/usr/bin/xdg-open: 882: elinks: not found
135
+
/usr/bin/xdg-open: 882: links: not found
136
+
/prj/qct/webtech_scratch20/mlg_user_admin/qaisw_source_repo/rel/qairt-2.37.1/point_release/SNPE_SRC/avante-tools/prebuilt/dsp/hexagon-sdk-5.5.5/ipc/fastrpc/rpcmem/src/rpcmem_android.c:42:dummy call to rpcmem_deinit, rpcmem APIs will be used from libxdsprpc
0 commit comments