msluszniak commited on
Commit
a2fe764
·
1 Parent(s): 0fbd42d

QNN: LR-ASPP MobileNetV3 a16w8, one context binary per Hexagon version

Browse files
README.md CHANGED
@@ -19,6 +19,26 @@ Upstream model: [LRASPP](https://docs.pytorch.org/vision/main/models/lraspp.html
19
  | `coreml/lraspp_mobilenet_v3_large_coreml_fp16.pte` | coreml | fp16 |
20
  | `xnnpack/lraspp_mobilenet_v3_large_xnnpack_fp32.pte` | xnnpack | fp32 |
21
  | `xnnpack/lraspp_mobilenet_v3_large_xnnpack_int8.pte` | xnnpack | int8 |
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
 
23
  ## Unshipped backends
24
 
 
19
  | `coreml/lraspp_mobilenet_v3_large_coreml_fp16.pte` | coreml | fp16 |
20
  | `xnnpack/lraspp_mobilenet_v3_large_xnnpack_fp32.pte` | xnnpack | fp32 |
21
  | `xnnpack/lraspp_mobilenet_v3_large_xnnpack_int8.pte` | xnnpack | int8 |
22
+ | `qnn/lraspp_mobilenet_v3_large_qnn_a16w8_v69.pte` | qnn | a16w8 |
23
+ | `qnn/lraspp_mobilenet_v3_large_qnn_a16w8_v73.pte` | qnn | a16w8 |
24
+ | `qnn/lraspp_mobilenet_v3_large_qnn_a16w8_v75.pte` | qnn | a16w8 |
25
+ | `qnn/lraspp_mobilenet_v3_large_qnn_a16w8_v79.pte` | qnn | a16w8 |
26
+ | `qnn/lraspp_mobilenet_v3_large_qnn_a16w8_v81.pte` | qnn | a16w8 |
27
+
28
+ ## QNN variants
29
+
30
+ A QNN `.pte` embeds an HTP context binary compiled for one Hexagon version, so
31
+ there is one file per version and the runtime picks the one matching the device.
32
+ These return a class index per pixel, `(1, 520, 520)` int32, rather than
33
+ `(1, 21, 520, 520)` logits.
34
+
35
+ | Hexagon | Example SoC |
36
+ | --- | --- |
37
+ | v69 | Snapdragon 8 Gen 1 |
38
+ | v73 | Snapdragon 8 Gen 2 |
39
+ | v75 | Snapdragon 8 Gen 3 |
40
+ | v79 | Snapdragon 8 Elite |
41
+ | v81 | Snapdragon 8 Elite Gen 5 |
42
 
43
  ## Unshipped backends
44
 
qnn/config.json ADDED
@@ -0,0 +1,167 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "$schema": "https://huggingface.co/software-mansion/react-native-executorch-spec/resolve/main/config.schema.json",
3
+ "model": "lraspp_mobilenet_v3_large",
4
+ "family": "lraspp",
5
+ "capabilities": [
6
+ "semantic-segmentation"
7
+ ],
8
+ "backend": "qnn",
9
+ "license": "bsd-3-clause",
10
+ "variants": [
11
+ {
12
+ "file": "lraspp_mobilenet_v3_large_qnn_a16w8_v69.pte",
13
+ "precision": "a16w8",
14
+ "quantized": true,
15
+ "default": false,
16
+ "methods": {
17
+ "forward": {
18
+ "inputs": [
19
+ {
20
+ "shape": [
21
+ 1,
22
+ 3,
23
+ 520,
24
+ 520
25
+ ],
26
+ "dtype": "float32"
27
+ }
28
+ ],
29
+ "outputs": [
30
+ {
31
+ "shape": [
32
+ 1,
33
+ 520,
34
+ 520
35
+ ],
36
+ "dtype": "int32"
37
+ }
38
+ ]
39
+ }
40
+ }
41
+ },
42
+ {
43
+ "file": "lraspp_mobilenet_v3_large_qnn_a16w8_v73.pte",
44
+ "precision": "a16w8",
45
+ "quantized": true,
46
+ "default": false,
47
+ "methods": {
48
+ "forward": {
49
+ "inputs": [
50
+ {
51
+ "shape": [
52
+ 1,
53
+ 3,
54
+ 520,
55
+ 520
56
+ ],
57
+ "dtype": "float32"
58
+ }
59
+ ],
60
+ "outputs": [
61
+ {
62
+ "shape": [
63
+ 1,
64
+ 520,
65
+ 520
66
+ ],
67
+ "dtype": "int32"
68
+ }
69
+ ]
70
+ }
71
+ }
72
+ },
73
+ {
74
+ "file": "lraspp_mobilenet_v3_large_qnn_a16w8_v75.pte",
75
+ "precision": "a16w8",
76
+ "quantized": true,
77
+ "default": false,
78
+ "methods": {
79
+ "forward": {
80
+ "inputs": [
81
+ {
82
+ "shape": [
83
+ 1,
84
+ 3,
85
+ 520,
86
+ 520
87
+ ],
88
+ "dtype": "float32"
89
+ }
90
+ ],
91
+ "outputs": [
92
+ {
93
+ "shape": [
94
+ 1,
95
+ 520,
96
+ 520
97
+ ],
98
+ "dtype": "int32"
99
+ }
100
+ ]
101
+ }
102
+ }
103
+ },
104
+ {
105
+ "file": "lraspp_mobilenet_v3_large_qnn_a16w8_v79.pte",
106
+ "precision": "a16w8",
107
+ "quantized": true,
108
+ "default": false,
109
+ "methods": {
110
+ "forward": {
111
+ "inputs": [
112
+ {
113
+ "shape": [
114
+ 1,
115
+ 3,
116
+ 520,
117
+ 520
118
+ ],
119
+ "dtype": "float32"
120
+ }
121
+ ],
122
+ "outputs": [
123
+ {
124
+ "shape": [
125
+ 1,
126
+ 520,
127
+ 520
128
+ ],
129
+ "dtype": "int32"
130
+ }
131
+ ]
132
+ }
133
+ }
134
+ },
135
+ {
136
+ "file": "lraspp_mobilenet_v3_large_qnn_a16w8_v81.pte",
137
+ "precision": "a16w8",
138
+ "quantized": true,
139
+ "default": true,
140
+ "methods": {
141
+ "forward": {
142
+ "inputs": [
143
+ {
144
+ "shape": [
145
+ 1,
146
+ 3,
147
+ 520,
148
+ 520
149
+ ],
150
+ "dtype": "float32"
151
+ }
152
+ ],
153
+ "outputs": [
154
+ {
155
+ "shape": [
156
+ 1,
157
+ 520,
158
+ 520
159
+ ],
160
+ "dtype": "int32"
161
+ }
162
+ ]
163
+ }
164
+ }
165
+ }
166
+ ]
167
+ }
qnn/lraspp_mobilenet_v3_large_qnn_a16w8_v69.pte ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cafb0690fc815c9ddc18db2b21fdd263ce1b56757d2f66995b534b2919ebb502
3
+ size 7169536
qnn/lraspp_mobilenet_v3_large_qnn_a16w8_v73.pte ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d5c2bed25b9dac0844cc68b655bc1333e61e62547f3041fc427e66b5c447008d
3
+ size 4920832
qnn/lraspp_mobilenet_v3_large_qnn_a16w8_v75.pte ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:413185caca4f5013355b5ef384cd463474dcfa57a4ef9d014c12f7ab0b1af7c9
3
+ size 4920832
qnn/lraspp_mobilenet_v3_large_qnn_a16w8_v79.pte ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fadada5a79b0d079aaf4c647a4ef57ce5ea8b3f3672a2cfb6404f2ca2118532c
3
+ size 4945408
qnn/lraspp_mobilenet_v3_large_qnn_a16w8_v81.pte ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:aec83444a2b492313449456d5f1d89c088fb93566de23290bba222c7411eac48
3
+ size 4953600