sync 6fdf6301e2bb
Browse files- README.md +19 -2
- build/webgpu/bench.json +2187 -0
- build/webgpu/conv-int-accumulate-spatial.wgsl.jinja +39 -58
- build/webgpu/conv-int-im2col-spatial.wgsl.jinja +23 -21
- build/webgpu/manifest.json +349 -164
- build/webgpu/metadata.json +19 -9
- build/webgpu/quant-dp4a-matmul.wgsl.jinja +103 -27
- build/webgpu/test.json +0 -0
README.md
CHANGED
|
@@ -52,12 +52,29 @@ Attributes and default values (overridable per request):
|
|
| 52 |
| `TW` | `uint8`, `int8` |
|
| 53 |
| `TY` | `int32` |
|
| 54 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 55 |
## Files
|
| 56 |
|
| 57 |
- [`metadata.json`](build/webgpu/metadata.json) — kernel metadata (id, digests, per-variant templates, provenance)
|
| 58 |
- [`manifest.json`](build/webgpu/manifest.json) — the op contract (source of truth)
|
| 59 |
- [`test.json`](build/webgpu/test.json) — correctness cases
|
| 60 |
-
- [`bench.json`](build/webgpu/bench.json) — benchmark
|
| 61 |
- [`conv-int-accumulate-spatial.wgsl.jinja`](build/webgpu/conv-int-accumulate-spatial.wgsl.jinja)
|
| 62 |
- [`conv-int-im2col-spatial.wgsl.jinja`](build/webgpu/conv-int-im2col-spatial.wgsl.jinja)
|
| 63 |
- [`quant-dp4a-matmul.wgsl.jinja`](build/webgpu/quant-dp4a-matmul.wgsl.jinja)
|
|
@@ -65,7 +82,7 @@ Attributes and default values (overridable per request):
|
|
| 65 |
## Use with `@huggingface/kernels`
|
| 66 |
|
| 67 |
```sh
|
| 68 |
-
npm install --save-exact @huggingface/kernels@0.0.1-preview.
|
| 69 |
```
|
| 70 |
|
| 71 |
Required output shapes and logical data types are inferred from the supplied inputs and attributes; result tensors are allocated automatically.
|
|
|
|
| 52 |
| `TW` | `uint8`, `int8` |
|
| 53 |
| `TY` | `int32` |
|
| 54 |
|
| 55 |
+
## Implementation variants
|
| 56 |
+
|
| 57 |
+
One implementation is selected per call from the device capabilities, the request shapes and the dtypes; these notes say what each one covers.
|
| 58 |
+
|
| 59 |
+
- `dp4a_pointwise_1x1_tail` — Exact tiled pointwise convolution for one or two spatial dimensions. Native packed dots or exact integer-vector dots share zero-point specialization; tile resources and dispatch eligibility follow device limits.
|
| 60 |
+
- `dp4a_pointwise_1x1_tail_x_zero_point_only` — Exact tiled pointwise convolution for one or two spatial dimensions. Native packed dots or exact integer-vector dots share zero-point specialization; tile resources and dispatch eligibility follow device limits.
|
| 61 |
+
- `dp4a_pointwise_1x1_tail_w_zero_point_only` — Exact tiled pointwise convolution for one or two spatial dimensions. Native packed dots or exact integer-vector dots share zero-point specialization; tile resources and dispatch eligibility follow device limits.
|
| 62 |
+
- `dp4a_pointwise_1x1_tail_no_zero_points` — Exact tiled pointwise convolution for one or two spatial dimensions. Native packed dots or exact integer-vector dots share zero-point specialization; tile resources and dispatch eligibility follow device limits.
|
| 63 |
+
- `dp4a_pointwise_1x1` — Exact tiled pointwise convolution for one or two spatial dimensions. Native packed dots or exact integer-vector dots share zero-point specialization; tile resources and dispatch eligibility follow device limits.
|
| 64 |
+
- `dp4a_pointwise_1x1_x_zero_point_only` — Exact tiled pointwise convolution for one or two spatial dimensions. Native packed dots or exact integer-vector dots share zero-point specialization; tile resources and dispatch eligibility follow device limits.
|
| 65 |
+
- `dp4a_pointwise_1x1_w_zero_point_only` — Exact tiled pointwise convolution for one or two spatial dimensions. Native packed dots or exact integer-vector dots share zero-point specialization; tile resources and dispatch eligibility follow device limits.
|
| 66 |
+
- `dp4a_pointwise_1x1_no_zero_points` — Exact tiled pointwise convolution for one or two spatial dimensions. Native packed dots or exact integer-vector dots share zero-point specialization; tile resources and dispatch eligibility follow device limits.
|
| 67 |
+
- `dp4a_pointwise_1x1_tail_per_channel` — Exact tiled pointwise convolution for one or two spatial dimensions. Native packed dots or exact integer-vector dots share zero-point specialization; tile resources and dispatch eligibility follow device limits.
|
| 68 |
+
- `dp4a_pointwise_1x1_tail_per_channel_w_zero_point_only` — Exact tiled pointwise convolution for one or two spatial dimensions. Native packed dots or exact integer-vector dots share zero-point specialization; tile resources and dispatch eligibility follow device limits.
|
| 69 |
+
- `dp4a_pointwise_1x1_per_channel` — Exact tiled pointwise convolution for one or two spatial dimensions. Native packed dots or exact integer-vector dots share zero-point specialization; tile resources and dispatch eligibility follow device limits.
|
| 70 |
+
- `dp4a_pointwise_1x1_per_channel_w_zero_point_only` — Exact tiled pointwise convolution for one or two spatial dimensions. Native packed dots or exact integer-vector dots share zero-point specialization; tile resources and dispatch eligibility follow device limits.
|
| 71 |
+
|
| 72 |
## Files
|
| 73 |
|
| 74 |
- [`metadata.json`](build/webgpu/metadata.json) — kernel metadata (id, digests, per-variant templates, provenance)
|
| 75 |
- [`manifest.json`](build/webgpu/manifest.json) — the op contract (source of truth)
|
| 76 |
- [`test.json`](build/webgpu/test.json) — correctness cases
|
| 77 |
+
- [`bench.json`](build/webgpu/bench.json) — benchmark cases
|
| 78 |
- [`conv-int-accumulate-spatial.wgsl.jinja`](build/webgpu/conv-int-accumulate-spatial.wgsl.jinja)
|
| 79 |
- [`conv-int-im2col-spatial.wgsl.jinja`](build/webgpu/conv-int-im2col-spatial.wgsl.jinja)
|
| 80 |
- [`quant-dp4a-matmul.wgsl.jinja`](build/webgpu/quant-dp4a-matmul.wgsl.jinja)
|
|
|
|
| 82 |
## Use with `@huggingface/kernels`
|
| 83 |
|
| 84 |
```sh
|
| 85 |
+
npm install --save-exact @huggingface/kernels@0.0.1-preview.3
|
| 86 |
```
|
| 87 |
|
| 88 |
Required output shapes and logical data types are inferred from the supplied inputs and attributes; result tensors are allocated automatically.
|
build/webgpu/bench.json
CHANGED
|
@@ -182,6 +182,2193 @@
|
|
| 182 |
]
|
| 183 |
},
|
| 184 |
"attrs": {}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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"cycle", "values": [0, 255, 1, 128, 127, 254, 63] }
|
| 193 |
+
},
|
| 194 |
+
"w": {
|
| 195 |
+
"dtype": "int8",
|
| 196 |
+
"shape": [128, 64, 1, 1],
|
| 197 |
+
"data": { "kind": "cycle", "values": [-1, 0, 1, -127, 63, -128, 127] }
|
| 198 |
+
},
|
| 199 |
+
"x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "constant", "value": 251 } }
|
| 200 |
+
},
|
| 201 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 128, 1, 3136] } },
|
| 202 |
+
"attrs": {},
|
| 203 |
+
"bench": { "metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1)" }] }
|
| 204 |
+
},
|
| 205 |
+
{
|
| 206 |
+
"name": "pointwise_zeros_uint8_int8_x1w0_b2c66m129n65",
|
| 207 |
+
"inputs": {
|
| 208 |
+
"x": {
|
| 209 |
+
"dtype": "uint8",
|
| 210 |
+
"shape": [2, 66, 1, 65],
|
| 211 |
+
"data": { "kind": "cycle", "values": [0, 255, 1, 128, 127, 254, 63] }
|
| 212 |
+
},
|
| 213 |
+
"w": {
|
| 214 |
+
"dtype": "int8",
|
| 215 |
+
"shape": [129, 66, 1, 1],
|
| 216 |
+
"data": { "kind": "cycle", "values": [-1, 0, 1, -127, 63, -128, 127] }
|
| 217 |
+
},
|
| 218 |
+
"x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "constant", "value": 251 } }
|
| 219 |
+
},
|
| 220 |
+
"outputs": { "y": { "dtype": "int32", "shape": [2, 129, 1, 65] } },
|
| 221 |
+
"attrs": {},
|
| 222 |
+
"bench": { "metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1)" }] }
|
| 223 |
+
},
|
| 224 |
+
{
|
| 225 |
+
"name": "pointwise_zeros_uint8_int8_x0w1_b1c64m128n3136",
|
| 226 |
+
"inputs": {
|
| 227 |
+
"x": {
|
| 228 |
+
"dtype": "uint8",
|
| 229 |
+
"shape": [1, 64, 1, 3136],
|
| 230 |
+
"data": { "kind": "cycle", "values": [0, 255, 1, 128, 127, 254, 63] }
|
| 231 |
+
},
|
| 232 |
+
"w": {
|
| 233 |
+
"dtype": "int8",
|
| 234 |
+
"shape": [128, 64, 1, 1],
|
| 235 |
+
"data": { "kind": "cycle", "values": [-1, 0, 1, -127, 63, -128, 127] }
|
| 236 |
+
},
|
| 237 |
+
"w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "constant", "value": 119 } }
|
| 238 |
+
},
|
| 239 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 128, 1, 3136] } },
|
| 240 |
+
"attrs": {},
|
| 241 |
+
"bench": { "metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1)" }] }
|
| 242 |
+
},
|
| 243 |
+
{
|
| 244 |
+
"name": "pointwise_zeros_uint8_int8_x0w1_b2c66m129n65",
|
| 245 |
+
"inputs": {
|
| 246 |
+
"x": {
|
| 247 |
+
"dtype": "uint8",
|
| 248 |
+
"shape": [2, 66, 1, 65],
|
| 249 |
+
"data": { "kind": "cycle", "values": [0, 255, 1, 128, 127, 254, 63] }
|
| 250 |
+
},
|
| 251 |
+
"w": {
|
| 252 |
+
"dtype": "int8",
|
| 253 |
+
"shape": [129, 66, 1, 1],
|
| 254 |
+
"data": { "kind": "cycle", "values": [-1, 0, 1, -127, 63, -128, 127] }
|
| 255 |
+
},
|
| 256 |
+
"w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "constant", "value": 119 } }
|
| 257 |
+
},
|
| 258 |
+
"outputs": { "y": { "dtype": "int32", "shape": [2, 129, 1, 65] } },
|
| 259 |
+
"attrs": {},
|
| 260 |
+
"bench": { "metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1)" }] }
|
| 261 |
+
},
|
| 262 |
+
{
|
| 263 |
+
"name": "pointwise_zeros_uint8_int8_x0w0_b1c64m128n3136",
|
| 264 |
+
"inputs": {
|
| 265 |
+
"x": {
|
| 266 |
+
"dtype": "uint8",
|
| 267 |
+
"shape": [1, 64, 1, 3136],
|
| 268 |
+
"data": { "kind": "cycle", "values": [0, 255, 1, 128, 127, 254, 63] }
|
| 269 |
+
},
|
| 270 |
+
"w": {
|
| 271 |
+
"dtype": "int8",
|
| 272 |
+
"shape": [128, 64, 1, 1],
|
| 273 |
+
"data": { "kind": "cycle", "values": [-1, 0, 1, -127, 63, -128, 127] }
|
| 274 |
+
}
|
| 275 |
+
},
|
| 276 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 128, 1, 3136] } },
|
| 277 |
+
"attrs": {},
|
| 278 |
+
"bench": { "metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1)" }] }
|
| 279 |
+
},
|
| 280 |
+
{
|
| 281 |
+
"name": "pointwise_zeros_uint8_int8_x0w0_b2c66m129n65",
|
| 282 |
+
"inputs": {
|
| 283 |
+
"x": {
|
| 284 |
+
"dtype": "uint8",
|
| 285 |
+
"shape": [2, 66, 1, 65],
|
| 286 |
+
"data": { "kind": "cycle", "values": [0, 255, 1, 128, 127, 254, 63] }
|
| 287 |
+
},
|
| 288 |
+
"w": {
|
| 289 |
+
"dtype": "int8",
|
| 290 |
+
"shape": [129, 66, 1, 1],
|
| 291 |
+
"data": { "kind": "cycle", "values": [-1, 0, 1, -127, 63, -128, 127] }
|
| 292 |
+
}
|
| 293 |
+
},
|
| 294 |
+
"outputs": { "y": { "dtype": "int32", "shape": [2, 129, 1, 65] } },
|
| 295 |
+
"attrs": {},
|
| 296 |
+
"bench": { "metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1)" }] }
|
| 297 |
+
},
|
| 298 |
+
{
|
| 299 |
+
"name": "pointwise_zeros_int8_int8_x1w0_b1c64m128n3136",
|
| 300 |
+
"inputs": {
|
| 301 |
+
"x": {
|
| 302 |
+
"dtype": "int8",
|
| 303 |
+
"shape": [1, 64, 1, 3136],
|
| 304 |
+
"data": { "kind": "cycle", "values": [-128, 127, -1, 0, 1, -127, 63] }
|
| 305 |
+
},
|
| 306 |
+
"w": {
|
| 307 |
+
"dtype": "int8",
|
| 308 |
+
"shape": [128, 64, 1, 1],
|
| 309 |
+
"data": { "kind": "cycle", "values": [-1, 0, 1, -127, 63, -128, 127] }
|
| 310 |
+
},
|
| 311 |
+
"x_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "constant", "value": -121 } }
|
| 312 |
+
},
|
| 313 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 128, 1, 3136] } },
|
| 314 |
+
"attrs": {},
|
| 315 |
+
"bench": { "metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1)" }] }
|
| 316 |
+
},
|
| 317 |
+
{
|
| 318 |
+
"name": "pointwise_zeros_int8_int8_x1w0_b2c66m129n65",
|
| 319 |
+
"inputs": {
|
| 320 |
+
"x": {
|
| 321 |
+
"dtype": "int8",
|
| 322 |
+
"shape": [2, 66, 1, 65],
|
| 323 |
+
"data": { "kind": "cycle", "values": [-128, 127, -1, 0, 1, -127, 63] }
|
| 324 |
+
},
|
| 325 |
+
"w": {
|
| 326 |
+
"dtype": "int8",
|
| 327 |
+
"shape": [129, 66, 1, 1],
|
| 328 |
+
"data": { "kind": "cycle", "values": [-1, 0, 1, -127, 63, -128, 127] }
|
| 329 |
+
},
|
| 330 |
+
"x_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "constant", "value": -121 } }
|
| 331 |
+
},
|
| 332 |
+
"outputs": { "y": { "dtype": "int32", "shape": [2, 129, 1, 65] } },
|
| 333 |
+
"attrs": {},
|
| 334 |
+
"bench": { "metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1)" }] }
|
| 335 |
+
},
|
| 336 |
+
{
|
| 337 |
+
"name": "pointwise_zeros_int8_int8_x0w1_b1c64m128n3136",
|
| 338 |
+
"inputs": {
|
| 339 |
+
"x": {
|
| 340 |
+
"dtype": "int8",
|
| 341 |
+
"shape": [1, 64, 1, 3136],
|
| 342 |
+
"data": { "kind": "cycle", "values": [-128, 127, -1, 0, 1, -127, 63] }
|
| 343 |
+
},
|
| 344 |
+
"w": {
|
| 345 |
+
"dtype": "int8",
|
| 346 |
+
"shape": [128, 64, 1, 1],
|
| 347 |
+
"data": { "kind": "cycle", "values": [-1, 0, 1, -127, 63, -128, 127] }
|
| 348 |
+
},
|
| 349 |
+
"w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "constant", "value": 119 } }
|
| 350 |
+
},
|
| 351 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 128, 1, 3136] } },
|
| 352 |
+
"attrs": {},
|
| 353 |
+
"bench": { "metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1)" }] }
|
| 354 |
+
},
|
| 355 |
+
{
|
| 356 |
+
"name": "pointwise_zeros_int8_int8_x0w1_b2c66m129n65",
|
| 357 |
+
"inputs": {
|
| 358 |
+
"x": {
|
| 359 |
+
"dtype": "int8",
|
| 360 |
+
"shape": [2, 66, 1, 65],
|
| 361 |
+
"data": { "kind": "cycle", "values": [-128, 127, -1, 0, 1, -127, 63] }
|
| 362 |
+
},
|
| 363 |
+
"w": {
|
| 364 |
+
"dtype": "int8",
|
| 365 |
+
"shape": [129, 66, 1, 1],
|
| 366 |
+
"data": { "kind": "cycle", "values": [-1, 0, 1, -127, 63, -128, 127] }
|
| 367 |
+
},
|
| 368 |
+
"w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "constant", "value": 119 } }
|
| 369 |
+
},
|
| 370 |
+
"outputs": { "y": { "dtype": "int32", "shape": [2, 129, 1, 65] } },
|
| 371 |
+
"attrs": {},
|
| 372 |
+
"bench": { "metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1)" }] }
|
| 373 |
+
},
|
| 374 |
+
{
|
| 375 |
+
"name": "pointwise_zeros_int8_int8_x0w0_b1c64m128n3136",
|
| 376 |
+
"inputs": {
|
| 377 |
+
"x": {
|
| 378 |
+
"dtype": "int8",
|
| 379 |
+
"shape": [1, 64, 1, 3136],
|
| 380 |
+
"data": { "kind": "cycle", "values": [-128, 127, -1, 0, 1, -127, 63] }
|
| 381 |
+
},
|
| 382 |
+
"w": {
|
| 383 |
+
"dtype": "int8",
|
| 384 |
+
"shape": [128, 64, 1, 1],
|
| 385 |
+
"data": { "kind": "cycle", "values": [-1, 0, 1, -127, 63, -128, 127] }
|
| 386 |
+
}
|
| 387 |
+
},
|
| 388 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 128, 1, 3136] } },
|
| 389 |
+
"attrs": {},
|
| 390 |
+
"bench": { "metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1)" }] }
|
| 391 |
+
},
|
| 392 |
+
{
|
| 393 |
+
"name": "pointwise_zeros_int8_int8_x0w0_b2c66m129n65",
|
| 394 |
+
"inputs": {
|
| 395 |
+
"x": {
|
| 396 |
+
"dtype": "int8",
|
| 397 |
+
"shape": [2, 66, 1, 65],
|
| 398 |
+
"data": { "kind": "cycle", "values": [-128, 127, -1, 0, 1, -127, 63] }
|
| 399 |
+
},
|
| 400 |
+
"w": {
|
| 401 |
+
"dtype": "int8",
|
| 402 |
+
"shape": [129, 66, 1, 1],
|
| 403 |
+
"data": { "kind": "cycle", "values": [-1, 0, 1, -127, 63, -128, 127] }
|
| 404 |
+
}
|
| 405 |
+
},
|
| 406 |
+
"outputs": { "y": { "dtype": "int32", "shape": [2, 129, 1, 65] } },
|
| 407 |
+
"attrs": {},
|
| 408 |
+
"bench": { "metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1)" }] }
|
| 409 |
+
},
|
| 410 |
+
{
|
| 411 |
+
"name": "pointwise_zeros_int8_uint8_x1w0_b1c64m128n3136",
|
| 412 |
+
"inputs": {
|
| 413 |
+
"x": {
|
| 414 |
+
"dtype": "int8",
|
| 415 |
+
"shape": [1, 64, 1, 3136],
|
| 416 |
+
"data": { "kind": "cycle", "values": [-128, 127, -1, 0, 1, -127, 63] }
|
| 417 |
+
},
|
| 418 |
+
"w": {
|
| 419 |
+
"dtype": "uint8",
|
| 420 |
+
"shape": [128, 64, 1, 1],
|
| 421 |
+
"data": { "kind": "cycle", "values": [1, 128, 127, 254, 63, 0, 255] }
|
| 422 |
+
},
|
| 423 |
+
"x_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "constant", "value": -121 } }
|
| 424 |
+
},
|
| 425 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 128, 1, 3136] } },
|
| 426 |
+
"attrs": {},
|
| 427 |
+
"bench": { "metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1)" }] }
|
| 428 |
+
},
|
| 429 |
+
{
|
| 430 |
+
"name": "pointwise_zeros_int8_uint8_x1w0_b2c66m129n65",
|
| 431 |
+
"inputs": {
|
| 432 |
+
"x": {
|
| 433 |
+
"dtype": "int8",
|
| 434 |
+
"shape": [2, 66, 1, 65],
|
| 435 |
+
"data": { "kind": "cycle", "values": [-128, 127, -1, 0, 1, -127, 63] }
|
| 436 |
+
},
|
| 437 |
+
"w": {
|
| 438 |
+
"dtype": "uint8",
|
| 439 |
+
"shape": [129, 66, 1, 1],
|
| 440 |
+
"data": { "kind": "cycle", "values": [1, 128, 127, 254, 63, 0, 255] }
|
| 441 |
+
},
|
| 442 |
+
"x_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "constant", "value": -121 } }
|
| 443 |
+
},
|
| 444 |
+
"outputs": { "y": { "dtype": "int32", "shape": [2, 129, 1, 65] } },
|
| 445 |
+
"attrs": {},
|
| 446 |
+
"bench": { "metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1)" }] }
|
| 447 |
+
},
|
| 448 |
+
{
|
| 449 |
+
"name": "pointwise_zeros_int8_uint8_x0w1_b1c64m128n3136",
|
| 450 |
+
"inputs": {
|
| 451 |
+
"x": {
|
| 452 |
+
"dtype": "int8",
|
| 453 |
+
"shape": [1, 64, 1, 3136],
|
| 454 |
+
"data": { "kind": "cycle", "values": [-128, 127, -1, 0, 1, -127, 63] }
|
| 455 |
+
},
|
| 456 |
+
"w": {
|
| 457 |
+
"dtype": "uint8",
|
| 458 |
+
"shape": [128, 64, 1, 1],
|
| 459 |
+
"data": { "kind": "cycle", "values": [1, 128, 127, 254, 63, 0, 255] }
|
| 460 |
+
},
|
| 461 |
+
"w_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "constant", "value": 253 } }
|
| 462 |
+
},
|
| 463 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 128, 1, 3136] } },
|
| 464 |
+
"attrs": {},
|
| 465 |
+
"bench": { "metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1)" }] }
|
| 466 |
+
},
|
| 467 |
+
{
|
| 468 |
+
"name": "pointwise_zeros_int8_uint8_x0w1_b2c66m129n65",
|
| 469 |
+
"inputs": {
|
| 470 |
+
"x": {
|
| 471 |
+
"dtype": "int8",
|
| 472 |
+
"shape": [2, 66, 1, 65],
|
| 473 |
+
"data": { "kind": "cycle", "values": [-128, 127, -1, 0, 1, -127, 63] }
|
| 474 |
+
},
|
| 475 |
+
"w": {
|
| 476 |
+
"dtype": "uint8",
|
| 477 |
+
"shape": [129, 66, 1, 1],
|
| 478 |
+
"data": { "kind": "cycle", "values": [1, 128, 127, 254, 63, 0, 255] }
|
| 479 |
+
},
|
| 480 |
+
"w_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "constant", "value": 253 } }
|
| 481 |
+
},
|
| 482 |
+
"outputs": { "y": { "dtype": "int32", "shape": [2, 129, 1, 65] } },
|
| 483 |
+
"attrs": {},
|
| 484 |
+
"bench": { "metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1)" }] }
|
| 485 |
+
},
|
| 486 |
+
{
|
| 487 |
+
"name": "pointwise_zeros_int8_uint8_x0w0_b1c64m128n3136",
|
| 488 |
+
"inputs": {
|
| 489 |
+
"x": {
|
| 490 |
+
"dtype": "int8",
|
| 491 |
+
"shape": [1, 64, 1, 3136],
|
| 492 |
+
"data": { "kind": "cycle", "values": [-128, 127, -1, 0, 1, -127, 63] }
|
| 493 |
+
},
|
| 494 |
+
"w": {
|
| 495 |
+
"dtype": "uint8",
|
| 496 |
+
"shape": [128, 64, 1, 1],
|
| 497 |
+
"data": { "kind": "cycle", "values": [1, 128, 127, 254, 63, 0, 255] }
|
| 498 |
+
}
|
| 499 |
+
},
|
| 500 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 128, 1, 3136] } },
|
| 501 |
+
"attrs": {},
|
| 502 |
+
"bench": { "metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1)" }] }
|
| 503 |
+
},
|
| 504 |
+
{
|
| 505 |
+
"name": "pointwise_zeros_int8_uint8_x0w0_b2c66m129n65",
|
| 506 |
+
"inputs": {
|
| 507 |
+
"x": {
|
| 508 |
+
"dtype": "int8",
|
| 509 |
+
"shape": [2, 66, 1, 65],
|
| 510 |
+
"data": { "kind": "cycle", "values": [-128, 127, -1, 0, 1, -127, 63] }
|
| 511 |
+
},
|
| 512 |
+
"w": {
|
| 513 |
+
"dtype": "uint8",
|
| 514 |
+
"shape": [129, 66, 1, 1],
|
| 515 |
+
"data": { "kind": "cycle", "values": [1, 128, 127, 254, 63, 0, 255] }
|
| 516 |
+
}
|
| 517 |
+
},
|
| 518 |
+
"outputs": { "y": { "dtype": "int32", "shape": [2, 129, 1, 65] } },
|
| 519 |
+
"attrs": {},
|
| 520 |
+
"bench": { "metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1)" }] }
|
| 521 |
+
},
|
| 522 |
+
{
|
| 523 |
+
"name": "pointwise_zeros_uint8_uint8_x1w0_b1c64m128n3136",
|
| 524 |
+
"inputs": {
|
| 525 |
+
"x": {
|
| 526 |
+
"dtype": "uint8",
|
| 527 |
+
"shape": [1, 64, 1, 3136],
|
| 528 |
+
"data": { "kind": "cycle", "values": [0, 255, 1, 128, 127, 254, 63] }
|
| 529 |
+
},
|
| 530 |
+
"w": {
|
| 531 |
+
"dtype": "uint8",
|
| 532 |
+
"shape": [128, 64, 1, 1],
|
| 533 |
+
"data": { "kind": "cycle", "values": [1, 128, 127, 254, 63, 0, 255] }
|
| 534 |
+
},
|
| 535 |
+
"x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "constant", "value": 251 } }
|
| 536 |
+
},
|
| 537 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 128, 1, 3136] } },
|
| 538 |
+
"attrs": {},
|
| 539 |
+
"bench": { "metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1)" }] }
|
| 540 |
+
},
|
| 541 |
+
{
|
| 542 |
+
"name": "pointwise_zeros_uint8_uint8_x1w0_b2c66m129n65",
|
| 543 |
+
"inputs": {
|
| 544 |
+
"x": {
|
| 545 |
+
"dtype": "uint8",
|
| 546 |
+
"shape": [2, 66, 1, 65],
|
| 547 |
+
"data": { "kind": "cycle", "values": [0, 255, 1, 128, 127, 254, 63] }
|
| 548 |
+
},
|
| 549 |
+
"w": {
|
| 550 |
+
"dtype": "uint8",
|
| 551 |
+
"shape": [129, 66, 1, 1],
|
| 552 |
+
"data": { "kind": "cycle", "values": [1, 128, 127, 254, 63, 0, 255] }
|
| 553 |
+
},
|
| 554 |
+
"x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "constant", "value": 251 } }
|
| 555 |
+
},
|
| 556 |
+
"outputs": { "y": { "dtype": "int32", "shape": [2, 129, 1, 65] } },
|
| 557 |
+
"attrs": {},
|
| 558 |
+
"bench": { "metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1)" }] }
|
| 559 |
+
},
|
| 560 |
+
{
|
| 561 |
+
"name": "pointwise_zeros_uint8_uint8_x0w1_b1c64m128n3136",
|
| 562 |
+
"inputs": {
|
| 563 |
+
"x": {
|
| 564 |
+
"dtype": "uint8",
|
| 565 |
+
"shape": [1, 64, 1, 3136],
|
| 566 |
+
"data": { "kind": "cycle", "values": [0, 255, 1, 128, 127, 254, 63] }
|
| 567 |
+
},
|
| 568 |
+
"w": {
|
| 569 |
+
"dtype": "uint8",
|
| 570 |
+
"shape": [128, 64, 1, 1],
|
| 571 |
+
"data": { "kind": "cycle", "values": [1, 128, 127, 254, 63, 0, 255] }
|
| 572 |
+
},
|
| 573 |
+
"w_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "constant", "value": 253 } }
|
| 574 |
+
},
|
| 575 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 128, 1, 3136] } },
|
| 576 |
+
"attrs": {},
|
| 577 |
+
"bench": { "metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1)" }] }
|
| 578 |
+
},
|
| 579 |
+
{
|
| 580 |
+
"name": "pointwise_zeros_uint8_uint8_x0w1_b2c66m129n65",
|
| 581 |
+
"inputs": {
|
| 582 |
+
"x": {
|
| 583 |
+
"dtype": "uint8",
|
| 584 |
+
"shape": [2, 66, 1, 65],
|
| 585 |
+
"data": { "kind": "cycle", "values": [0, 255, 1, 128, 127, 254, 63] }
|
| 586 |
+
},
|
| 587 |
+
"w": {
|
| 588 |
+
"dtype": "uint8",
|
| 589 |
+
"shape": [129, 66, 1, 1],
|
| 590 |
+
"data": { "kind": "cycle", "values": [1, 128, 127, 254, 63, 0, 255] }
|
| 591 |
+
},
|
| 592 |
+
"w_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "constant", "value": 253 } }
|
| 593 |
+
},
|
| 594 |
+
"outputs": { "y": { "dtype": "int32", "shape": [2, 129, 1, 65] } },
|
| 595 |
+
"attrs": {},
|
| 596 |
+
"bench": { "metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1)" }] }
|
| 597 |
+
},
|
| 598 |
+
{
|
| 599 |
+
"name": "pointwise_zeros_uint8_uint8_x0w0_b1c64m128n3136",
|
| 600 |
+
"inputs": {
|
| 601 |
+
"x": {
|
| 602 |
+
"dtype": "uint8",
|
| 603 |
+
"shape": [1, 64, 1, 3136],
|
| 604 |
+
"data": { "kind": "cycle", "values": [0, 255, 1, 128, 127, 254, 63] }
|
| 605 |
+
},
|
| 606 |
+
"w": {
|
| 607 |
+
"dtype": "uint8",
|
| 608 |
+
"shape": [128, 64, 1, 1],
|
| 609 |
+
"data": { "kind": "cycle", "values": [1, 128, 127, 254, 63, 0, 255] }
|
| 610 |
+
}
|
| 611 |
+
},
|
| 612 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 128, 1, 3136] } },
|
| 613 |
+
"attrs": {},
|
| 614 |
+
"bench": { "metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1)" }] }
|
| 615 |
+
},
|
| 616 |
+
{
|
| 617 |
+
"name": "pointwise_zeros_uint8_uint8_x0w0_b2c66m129n65",
|
| 618 |
+
"inputs": {
|
| 619 |
+
"x": {
|
| 620 |
+
"dtype": "uint8",
|
| 621 |
+
"shape": [2, 66, 1, 65],
|
| 622 |
+
"data": { "kind": "cycle", "values": [0, 255, 1, 128, 127, 254, 63] }
|
| 623 |
+
},
|
| 624 |
+
"w": {
|
| 625 |
+
"dtype": "uint8",
|
| 626 |
+
"shape": [129, 66, 1, 1],
|
| 627 |
+
"data": { "kind": "cycle", "values": [1, 128, 127, 254, 63, 0, 255] }
|
| 628 |
+
}
|
| 629 |
+
},
|
| 630 |
+
"outputs": { "y": { "dtype": "int32", "shape": [2, 129, 1, 65] } },
|
| 631 |
+
"attrs": {},
|
| 632 |
+
"bench": { "metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1)" }] }
|
| 633 |
+
},
|
| 634 |
+
{
|
| 635 |
+
"name": "per_channel_uint8_int8_x1_b1c64m128n3136",
|
| 636 |
+
"inputs": {
|
| 637 |
+
"x": {
|
| 638 |
+
"dtype": "uint8",
|
| 639 |
+
"shape": [1, 64, 1, 3136],
|
| 640 |
+
"data": { "kind": "cycle", "values": [0, 255, 1, 128, 127, 254, 63] }
|
| 641 |
+
},
|
| 642 |
+
"w": {
|
| 643 |
+
"dtype": "int8",
|
| 644 |
+
"shape": [128, 64, 1, 1],
|
| 645 |
+
"data": { "kind": "cycle", "values": [-1, 0, 1, -127, 63, -128, 127] }
|
| 646 |
+
},
|
| 647 |
+
"x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "constant", "value": 251 } },
|
| 648 |
+
"w_zero_point": {
|
| 649 |
+
"dtype": "int8",
|
| 650 |
+
"shape": [128],
|
| 651 |
+
"data": { "kind": "cycle", "values": [-128, 127, -1, 0, 1] }
|
| 652 |
+
}
|
| 653 |
+
},
|
| 654 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 128, 1, 3136] } },
|
| 655 |
+
"attrs": {},
|
| 656 |
+
"bench": { "metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1)" }] }
|
| 657 |
+
},
|
| 658 |
+
{
|
| 659 |
+
"name": "per_channel_uint8_int8_x1_b2c66m129n65",
|
| 660 |
+
"inputs": {
|
| 661 |
+
"x": {
|
| 662 |
+
"dtype": "uint8",
|
| 663 |
+
"shape": [2, 66, 1, 65],
|
| 664 |
+
"data": { "kind": "cycle", "values": [0, 255, 1, 128, 127, 254, 63] }
|
| 665 |
+
},
|
| 666 |
+
"w": {
|
| 667 |
+
"dtype": "int8",
|
| 668 |
+
"shape": [129, 66, 1, 1],
|
| 669 |
+
"data": { "kind": "cycle", "values": [-1, 0, 1, -127, 63, -128, 127] }
|
| 670 |
+
},
|
| 671 |
+
"x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "constant", "value": 251 } },
|
| 672 |
+
"w_zero_point": {
|
| 673 |
+
"dtype": "int8",
|
| 674 |
+
"shape": [129],
|
| 675 |
+
"data": { "kind": "cycle", "values": [-128, 127, -1, 0, 1] }
|
| 676 |
+
}
|
| 677 |
+
},
|
| 678 |
+
"outputs": { "y": { "dtype": "int32", "shape": [2, 129, 1, 65] } },
|
| 679 |
+
"attrs": {},
|
| 680 |
+
"bench": { "metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1)" }] }
|
| 681 |
+
},
|
| 682 |
+
{
|
| 683 |
+
"name": "per_channel_uint8_int8_x0_b1c64m128n3136",
|
| 684 |
+
"inputs": {
|
| 685 |
+
"x": {
|
| 686 |
+
"dtype": "uint8",
|
| 687 |
+
"shape": [1, 64, 1, 3136],
|
| 688 |
+
"data": { "kind": "cycle", "values": [0, 255, 1, 128, 127, 254, 63] }
|
| 689 |
+
},
|
| 690 |
+
"w": {
|
| 691 |
+
"dtype": "int8",
|
| 692 |
+
"shape": [128, 64, 1, 1],
|
| 693 |
+
"data": { "kind": "cycle", "values": [-1, 0, 1, -127, 63, -128, 127] }
|
| 694 |
+
},
|
| 695 |
+
"w_zero_point": {
|
| 696 |
+
"dtype": "int8",
|
| 697 |
+
"shape": [128],
|
| 698 |
+
"data": { "kind": "cycle", "values": [-128, 127, -1, 0, 1] }
|
| 699 |
+
}
|
| 700 |
+
},
|
| 701 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 128, 1, 3136] } },
|
| 702 |
+
"attrs": {},
|
| 703 |
+
"bench": { "metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1)" }] }
|
| 704 |
+
},
|
| 705 |
+
{
|
| 706 |
+
"name": "per_channel_uint8_int8_x0_b2c66m129n65",
|
| 707 |
+
"inputs": {
|
| 708 |
+
"x": {
|
| 709 |
+
"dtype": "uint8",
|
| 710 |
+
"shape": [2, 66, 1, 65],
|
| 711 |
+
"data": { "kind": "cycle", "values": [0, 255, 1, 128, 127, 254, 63] }
|
| 712 |
+
},
|
| 713 |
+
"w": {
|
| 714 |
+
"dtype": "int8",
|
| 715 |
+
"shape": [129, 66, 1, 1],
|
| 716 |
+
"data": { "kind": "cycle", "values": [-1, 0, 1, -127, 63, -128, 127] }
|
| 717 |
+
},
|
| 718 |
+
"w_zero_point": {
|
| 719 |
+
"dtype": "int8",
|
| 720 |
+
"shape": [129],
|
| 721 |
+
"data": { "kind": "cycle", "values": [-128, 127, -1, 0, 1] }
|
| 722 |
+
}
|
| 723 |
+
},
|
| 724 |
+
"outputs": { "y": { "dtype": "int32", "shape": [2, 129, 1, 65] } },
|
| 725 |
+
"attrs": {},
|
| 726 |
+
"bench": { "metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1)" }] }
|
| 727 |
+
},
|
| 728 |
+
{
|
| 729 |
+
"name": "per_channel_int8_int8_x1_b1c64m128n3136",
|
| 730 |
+
"inputs": {
|
| 731 |
+
"x": {
|
| 732 |
+
"dtype": "int8",
|
| 733 |
+
"shape": [1, 64, 1, 3136],
|
| 734 |
+
"data": { "kind": "cycle", "values": [-128, 127, -1, 0, 1, -127, 63] }
|
| 735 |
+
},
|
| 736 |
+
"w": {
|
| 737 |
+
"dtype": "int8",
|
| 738 |
+
"shape": [128, 64, 1, 1],
|
| 739 |
+
"data": { "kind": "cycle", "values": [-1, 0, 1, -127, 63, -128, 127] }
|
| 740 |
+
},
|
| 741 |
+
"x_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "constant", "value": -121 } },
|
| 742 |
+
"w_zero_point": {
|
| 743 |
+
"dtype": "int8",
|
| 744 |
+
"shape": [128],
|
| 745 |
+
"data": { "kind": "cycle", "values": [-128, 127, -1, 0, 1] }
|
| 746 |
+
}
|
| 747 |
+
},
|
| 748 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 128, 1, 3136] } },
|
| 749 |
+
"attrs": {},
|
| 750 |
+
"bench": { "metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1)" }] }
|
| 751 |
+
},
|
| 752 |
+
{
|
| 753 |
+
"name": "per_channel_int8_int8_x1_b2c66m129n65",
|
| 754 |
+
"inputs": {
|
| 755 |
+
"x": {
|
| 756 |
+
"dtype": "int8",
|
| 757 |
+
"shape": [2, 66, 1, 65],
|
| 758 |
+
"data": { "kind": "cycle", "values": [-128, 127, -1, 0, 1, -127, 63] }
|
| 759 |
+
},
|
| 760 |
+
"w": {
|
| 761 |
+
"dtype": "int8",
|
| 762 |
+
"shape": [129, 66, 1, 1],
|
| 763 |
+
"data": { "kind": "cycle", "values": [-1, 0, 1, -127, 63, -128, 127] }
|
| 764 |
+
},
|
| 765 |
+
"x_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "constant", "value": -121 } },
|
| 766 |
+
"w_zero_point": {
|
| 767 |
+
"dtype": "int8",
|
| 768 |
+
"shape": [129],
|
| 769 |
+
"data": { "kind": "cycle", "values": [-128, 127, -1, 0, 1] }
|
| 770 |
+
}
|
| 771 |
+
},
|
| 772 |
+
"outputs": { "y": { "dtype": "int32", "shape": [2, 129, 1, 65] } },
|
| 773 |
+
"attrs": {},
|
| 774 |
+
"bench": { "metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1)" }] }
|
| 775 |
+
},
|
| 776 |
+
{
|
| 777 |
+
"name": "per_channel_int8_int8_x0_b1c64m128n3136",
|
| 778 |
+
"inputs": {
|
| 779 |
+
"x": {
|
| 780 |
+
"dtype": "int8",
|
| 781 |
+
"shape": [1, 64, 1, 3136],
|
| 782 |
+
"data": { "kind": "cycle", "values": [-128, 127, -1, 0, 1, -127, 63] }
|
| 783 |
+
},
|
| 784 |
+
"w": {
|
| 785 |
+
"dtype": "int8",
|
| 786 |
+
"shape": [128, 64, 1, 1],
|
| 787 |
+
"data": { "kind": "cycle", "values": [-1, 0, 1, -127, 63, -128, 127] }
|
| 788 |
+
},
|
| 789 |
+
"w_zero_point": {
|
| 790 |
+
"dtype": "int8",
|
| 791 |
+
"shape": [128],
|
| 792 |
+
"data": { "kind": "cycle", "values": [-128, 127, -1, 0, 1] }
|
| 793 |
+
}
|
| 794 |
+
},
|
| 795 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 128, 1, 3136] } },
|
| 796 |
+
"attrs": {},
|
| 797 |
+
"bench": { "metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1)" }] }
|
| 798 |
+
},
|
| 799 |
+
{
|
| 800 |
+
"name": "per_channel_int8_int8_x0_b2c66m129n65",
|
| 801 |
+
"inputs": {
|
| 802 |
+
"x": {
|
| 803 |
+
"dtype": "int8",
|
| 804 |
+
"shape": [2, 66, 1, 65],
|
| 805 |
+
"data": { "kind": "cycle", "values": [-128, 127, -1, 0, 1, -127, 63] }
|
| 806 |
+
},
|
| 807 |
+
"w": {
|
| 808 |
+
"dtype": "int8",
|
| 809 |
+
"shape": [129, 66, 1, 1],
|
| 810 |
+
"data": { "kind": "cycle", "values": [-1, 0, 1, -127, 63, -128, 127] }
|
| 811 |
+
},
|
| 812 |
+
"w_zero_point": {
|
| 813 |
+
"dtype": "int8",
|
| 814 |
+
"shape": [129],
|
| 815 |
+
"data": { "kind": "cycle", "values": [-128, 127, -1, 0, 1] }
|
| 816 |
+
}
|
| 817 |
+
},
|
| 818 |
+
"outputs": { "y": { "dtype": "int32", "shape": [2, 129, 1, 65] } },
|
| 819 |
+
"attrs": {},
|
| 820 |
+
"bench": { "metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1)" }] }
|
| 821 |
+
},
|
| 822 |
+
{
|
| 823 |
+
"name": "per_channel_int8_uint8_x1_b1c64m128n3136",
|
| 824 |
+
"inputs": {
|
| 825 |
+
"x": {
|
| 826 |
+
"dtype": "int8",
|
| 827 |
+
"shape": [1, 64, 1, 3136],
|
| 828 |
+
"data": { "kind": "cycle", "values": [-128, 127, -1, 0, 1, -127, 63] }
|
| 829 |
+
},
|
| 830 |
+
"w": {
|
| 831 |
+
"dtype": "uint8",
|
| 832 |
+
"shape": [128, 64, 1, 1],
|
| 833 |
+
"data": { "kind": "cycle", "values": [1, 128, 127, 254, 63, 0, 255] }
|
| 834 |
+
},
|
| 835 |
+
"x_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "constant", "value": -121 } },
|
| 836 |
+
"w_zero_point": {
|
| 837 |
+
"dtype": "uint8",
|
| 838 |
+
"shape": [128],
|
| 839 |
+
"data": { "kind": "cycle", "values": [0, 255, 1, 128, 254] }
|
| 840 |
+
}
|
| 841 |
+
},
|
| 842 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 128, 1, 3136] } },
|
| 843 |
+
"attrs": {},
|
| 844 |
+
"bench": { "metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1)" }] }
|
| 845 |
+
},
|
| 846 |
+
{
|
| 847 |
+
"name": "per_channel_int8_uint8_x1_b2c66m129n65",
|
| 848 |
+
"inputs": {
|
| 849 |
+
"x": {
|
| 850 |
+
"dtype": "int8",
|
| 851 |
+
"shape": [2, 66, 1, 65],
|
| 852 |
+
"data": { "kind": "cycle", "values": [-128, 127, -1, 0, 1, -127, 63] }
|
| 853 |
+
},
|
| 854 |
+
"w": {
|
| 855 |
+
"dtype": "uint8",
|
| 856 |
+
"shape": [129, 66, 1, 1],
|
| 857 |
+
"data": { "kind": "cycle", "values": [1, 128, 127, 254, 63, 0, 255] }
|
| 858 |
+
},
|
| 859 |
+
"x_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "constant", "value": -121 } },
|
| 860 |
+
"w_zero_point": {
|
| 861 |
+
"dtype": "uint8",
|
| 862 |
+
"shape": [129],
|
| 863 |
+
"data": { "kind": "cycle", "values": [0, 255, 1, 128, 254] }
|
| 864 |
+
}
|
| 865 |
+
},
|
| 866 |
+
"outputs": { "y": { "dtype": "int32", "shape": [2, 129, 1, 65] } },
|
| 867 |
+
"attrs": {},
|
| 868 |
+
"bench": { "metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1)" }] }
|
| 869 |
+
},
|
| 870 |
+
{
|
| 871 |
+
"name": "per_channel_int8_uint8_x0_b1c64m128n3136",
|
| 872 |
+
"inputs": {
|
| 873 |
+
"x": {
|
| 874 |
+
"dtype": "int8",
|
| 875 |
+
"shape": [1, 64, 1, 3136],
|
| 876 |
+
"data": { "kind": "cycle", "values": [-128, 127, -1, 0, 1, -127, 63] }
|
| 877 |
+
},
|
| 878 |
+
"w": {
|
| 879 |
+
"dtype": "uint8",
|
| 880 |
+
"shape": [128, 64, 1, 1],
|
| 881 |
+
"data": { "kind": "cycle", "values": [1, 128, 127, 254, 63, 0, 255] }
|
| 882 |
+
},
|
| 883 |
+
"w_zero_point": {
|
| 884 |
+
"dtype": "uint8",
|
| 885 |
+
"shape": [128],
|
| 886 |
+
"data": { "kind": "cycle", "values": [0, 255, 1, 128, 254] }
|
| 887 |
+
}
|
| 888 |
+
},
|
| 889 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 128, 1, 3136] } },
|
| 890 |
+
"attrs": {},
|
| 891 |
+
"bench": { "metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1)" }] }
|
| 892 |
+
},
|
| 893 |
+
{
|
| 894 |
+
"name": "per_channel_int8_uint8_x0_b2c66m129n65",
|
| 895 |
+
"inputs": {
|
| 896 |
+
"x": {
|
| 897 |
+
"dtype": "int8",
|
| 898 |
+
"shape": [2, 66, 1, 65],
|
| 899 |
+
"data": { "kind": "cycle", "values": [-128, 127, -1, 0, 1, -127, 63] }
|
| 900 |
+
},
|
| 901 |
+
"w": {
|
| 902 |
+
"dtype": "uint8",
|
| 903 |
+
"shape": [129, 66, 1, 1],
|
| 904 |
+
"data": { "kind": "cycle", "values": [1, 128, 127, 254, 63, 0, 255] }
|
| 905 |
+
},
|
| 906 |
+
"w_zero_point": {
|
| 907 |
+
"dtype": "uint8",
|
| 908 |
+
"shape": [129],
|
| 909 |
+
"data": { "kind": "cycle", "values": [0, 255, 1, 128, 254] }
|
| 910 |
+
}
|
| 911 |
+
},
|
| 912 |
+
"outputs": { "y": { "dtype": "int32", "shape": [2, 129, 1, 65] } },
|
| 913 |
+
"attrs": {},
|
| 914 |
+
"bench": { "metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1)" }] }
|
| 915 |
+
},
|
| 916 |
+
{
|
| 917 |
+
"name": "per_channel_uint8_uint8_x1_b1c64m128n3136",
|
| 918 |
+
"inputs": {
|
| 919 |
+
"x": {
|
| 920 |
+
"dtype": "uint8",
|
| 921 |
+
"shape": [1, 64, 1, 3136],
|
| 922 |
+
"data": { "kind": "cycle", "values": [0, 255, 1, 128, 127, 254, 63] }
|
| 923 |
+
},
|
| 924 |
+
"w": {
|
| 925 |
+
"dtype": "uint8",
|
| 926 |
+
"shape": [128, 64, 1, 1],
|
| 927 |
+
"data": { "kind": "cycle", "values": [1, 128, 127, 254, 63, 0, 255] }
|
| 928 |
+
},
|
| 929 |
+
"x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "constant", "value": 251 } },
|
| 930 |
+
"w_zero_point": {
|
| 931 |
+
"dtype": "uint8",
|
| 932 |
+
"shape": [128],
|
| 933 |
+
"data": { "kind": "cycle", "values": [0, 255, 1, 128, 254] }
|
| 934 |
+
}
|
| 935 |
+
},
|
| 936 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 128, 1, 3136] } },
|
| 937 |
+
"attrs": {},
|
| 938 |
+
"bench": { "metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1)" }] }
|
| 939 |
+
},
|
| 940 |
+
{
|
| 941 |
+
"name": "per_channel_uint8_uint8_x1_b2c66m129n65",
|
| 942 |
+
"inputs": {
|
| 943 |
+
"x": {
|
| 944 |
+
"dtype": "uint8",
|
| 945 |
+
"shape": [2, 66, 1, 65],
|
| 946 |
+
"data": { "kind": "cycle", "values": [0, 255, 1, 128, 127, 254, 63] }
|
| 947 |
+
},
|
| 948 |
+
"w": {
|
| 949 |
+
"dtype": "uint8",
|
| 950 |
+
"shape": [129, 66, 1, 1],
|
| 951 |
+
"data": { "kind": "cycle", "values": [1, 128, 127, 254, 63, 0, 255] }
|
| 952 |
+
},
|
| 953 |
+
"x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "constant", "value": 251 } },
|
| 954 |
+
"w_zero_point": {
|
| 955 |
+
"dtype": "uint8",
|
| 956 |
+
"shape": [129],
|
| 957 |
+
"data": { "kind": "cycle", "values": [0, 255, 1, 128, 254] }
|
| 958 |
+
}
|
| 959 |
+
},
|
| 960 |
+
"outputs": { "y": { "dtype": "int32", "shape": [2, 129, 1, 65] } },
|
| 961 |
+
"attrs": {},
|
| 962 |
+
"bench": { "metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1)" }] }
|
| 963 |
+
},
|
| 964 |
+
{
|
| 965 |
+
"name": "per_channel_uint8_uint8_x0_b1c64m128n3136",
|
| 966 |
+
"inputs": {
|
| 967 |
+
"x": {
|
| 968 |
+
"dtype": "uint8",
|
| 969 |
+
"shape": [1, 64, 1, 3136],
|
| 970 |
+
"data": { "kind": "cycle", "values": [0, 255, 1, 128, 127, 254, 63] }
|
| 971 |
+
},
|
| 972 |
+
"w": {
|
| 973 |
+
"dtype": "uint8",
|
| 974 |
+
"shape": [128, 64, 1, 1],
|
| 975 |
+
"data": { "kind": "cycle", "values": [1, 128, 127, 254, 63, 0, 255] }
|
| 976 |
+
},
|
| 977 |
+
"w_zero_point": {
|
| 978 |
+
"dtype": "uint8",
|
| 979 |
+
"shape": [128],
|
| 980 |
+
"data": { "kind": "cycle", "values": [0, 255, 1, 128, 254] }
|
| 981 |
+
}
|
| 982 |
+
},
|
| 983 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 128, 1, 3136] } },
|
| 984 |
+
"attrs": {},
|
| 985 |
+
"bench": { "metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1)" }] }
|
| 986 |
+
},
|
| 987 |
+
{
|
| 988 |
+
"name": "per_channel_uint8_uint8_x0_b2c66m129n65",
|
| 989 |
+
"inputs": {
|
| 990 |
+
"x": {
|
| 991 |
+
"dtype": "uint8",
|
| 992 |
+
"shape": [2, 66, 1, 65],
|
| 993 |
+
"data": { "kind": "cycle", "values": [0, 255, 1, 128, 127, 254, 63] }
|
| 994 |
+
},
|
| 995 |
+
"w": {
|
| 996 |
+
"dtype": "uint8",
|
| 997 |
+
"shape": [129, 66, 1, 1],
|
| 998 |
+
"data": { "kind": "cycle", "values": [1, 128, 127, 254, 63, 0, 255] }
|
| 999 |
+
},
|
| 1000 |
+
"w_zero_point": {
|
| 1001 |
+
"dtype": "uint8",
|
| 1002 |
+
"shape": [129],
|
| 1003 |
+
"data": { "kind": "cycle", "values": [0, 255, 1, 128, 254] }
|
| 1004 |
+
}
|
| 1005 |
+
},
|
| 1006 |
+
"outputs": { "y": { "dtype": "int32", "shape": [2, 129, 1, 65] } },
|
| 1007 |
+
"attrs": {},
|
| 1008 |
+
"bench": { "metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1)" }] }
|
| 1009 |
+
},
|
| 1010 |
+
{
|
| 1011 |
+
"name": "pointwise_zeros_uint8_uint8_x1w0_b1c4m1n1",
|
| 1012 |
+
"inputs": {
|
| 1013 |
+
"x": {
|
| 1014 |
+
"dtype": "uint8",
|
| 1015 |
+
"shape": [1, 4, 1, 1],
|
| 1016 |
+
"data": { "kind": "cycle", "values": [0, 255, 1, 128, 127, 254, 63] }
|
| 1017 |
+
},
|
| 1018 |
+
"w": {
|
| 1019 |
+
"dtype": "uint8",
|
| 1020 |
+
"shape": [1, 4, 1, 1],
|
| 1021 |
+
"data": { "kind": "cycle", "values": [1, 128, 127, 254, 63, 0, 255] }
|
| 1022 |
+
},
|
| 1023 |
+
"x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "constant", "value": 251 } }
|
| 1024 |
+
},
|
| 1025 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 1, 1, 1] } },
|
| 1026 |
+
"attrs": {},
|
| 1027 |
+
"bench": { "metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1)" }] }
|
| 1028 |
+
},
|
| 1029 |
+
{
|
| 1030 |
+
"name": "pointwise_zeros_uint8_uint8_x1w0_b1c4m7n63",
|
| 1031 |
+
"inputs": {
|
| 1032 |
+
"x": {
|
| 1033 |
+
"dtype": "uint8",
|
| 1034 |
+
"shape": [1, 4, 1, 63],
|
| 1035 |
+
"data": { "kind": "cycle", "values": [0, 255, 1, 128, 127, 254, 63] }
|
| 1036 |
+
},
|
| 1037 |
+
"w": {
|
| 1038 |
+
"dtype": "uint8",
|
| 1039 |
+
"shape": [7, 4, 1, 1],
|
| 1040 |
+
"data": { "kind": "cycle", "values": [1, 128, 127, 254, 63, 0, 255] }
|
| 1041 |
+
},
|
| 1042 |
+
"x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "constant", "value": 251 } }
|
| 1043 |
+
},
|
| 1044 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 7, 1, 63] } },
|
| 1045 |
+
"attrs": {},
|
| 1046 |
+
"bench": { "metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1)" }] }
|
| 1047 |
+
},
|
| 1048 |
+
{
|
| 1049 |
+
"name": "pointwise_zeros_uint8_uint8_x0w1_b1c4m1n1",
|
| 1050 |
+
"inputs": {
|
| 1051 |
+
"x": {
|
| 1052 |
+
"dtype": "uint8",
|
| 1053 |
+
"shape": [1, 4, 1, 1],
|
| 1054 |
+
"data": { "kind": "cycle", "values": [0, 255, 1, 128, 127, 254, 63] }
|
| 1055 |
+
},
|
| 1056 |
+
"w": {
|
| 1057 |
+
"dtype": "uint8",
|
| 1058 |
+
"shape": [1, 4, 1, 1],
|
| 1059 |
+
"data": { "kind": "cycle", "values": [1, 128, 127, 254, 63, 0, 255] }
|
| 1060 |
+
},
|
| 1061 |
+
"w_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "constant", "value": 253 } }
|
| 1062 |
+
},
|
| 1063 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 1, 1, 1] } },
|
| 1064 |
+
"attrs": {},
|
| 1065 |
+
"bench": { "metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1)" }] }
|
| 1066 |
+
},
|
| 1067 |
+
{
|
| 1068 |
+
"name": "pointwise_zeros_uint8_uint8_x0w1_b1c4m7n63",
|
| 1069 |
+
"inputs": {
|
| 1070 |
+
"x": {
|
| 1071 |
+
"dtype": "uint8",
|
| 1072 |
+
"shape": [1, 4, 1, 63],
|
| 1073 |
+
"data": { "kind": "cycle", "values": [0, 255, 1, 128, 127, 254, 63] }
|
| 1074 |
+
},
|
| 1075 |
+
"w": {
|
| 1076 |
+
"dtype": "uint8",
|
| 1077 |
+
"shape": [7, 4, 1, 1],
|
| 1078 |
+
"data": { "kind": "cycle", "values": [1, 128, 127, 254, 63, 0, 255] }
|
| 1079 |
+
},
|
| 1080 |
+
"w_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "constant", "value": 253 } }
|
| 1081 |
+
},
|
| 1082 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 7, 1, 63] } },
|
| 1083 |
+
"attrs": {},
|
| 1084 |
+
"bench": { "metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1)" }] }
|
| 1085 |
+
},
|
| 1086 |
+
{
|
| 1087 |
+
"name": "pointwise_zeros_uint8_uint8_x0w0_b1c4m1n1",
|
| 1088 |
+
"inputs": {
|
| 1089 |
+
"x": {
|
| 1090 |
+
"dtype": "uint8",
|
| 1091 |
+
"shape": [1, 4, 1, 1],
|
| 1092 |
+
"data": { "kind": "cycle", "values": [0, 255, 1, 128, 127, 254, 63] }
|
| 1093 |
+
},
|
| 1094 |
+
"w": {
|
| 1095 |
+
"dtype": "uint8",
|
| 1096 |
+
"shape": [1, 4, 1, 1],
|
| 1097 |
+
"data": { "kind": "cycle", "values": [1, 128, 127, 254, 63, 0, 255] }
|
| 1098 |
+
}
|
| 1099 |
+
},
|
| 1100 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 1, 1, 1] } },
|
| 1101 |
+
"attrs": {},
|
| 1102 |
+
"bench": { "metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1)" }] }
|
| 1103 |
+
},
|
| 1104 |
+
{
|
| 1105 |
+
"name": "pointwise_zeros_uint8_uint8_x0w0_b1c4m7n63",
|
| 1106 |
+
"inputs": {
|
| 1107 |
+
"x": {
|
| 1108 |
+
"dtype": "uint8",
|
| 1109 |
+
"shape": [1, 4, 1, 63],
|
| 1110 |
+
"data": { "kind": "cycle", "values": [0, 255, 1, 128, 127, 254, 63] }
|
| 1111 |
+
},
|
| 1112 |
+
"w": {
|
| 1113 |
+
"dtype": "uint8",
|
| 1114 |
+
"shape": [7, 4, 1, 1],
|
| 1115 |
+
"data": { "kind": "cycle", "values": [1, 128, 127, 254, 63, 0, 255] }
|
| 1116 |
+
}
|
| 1117 |
+
},
|
| 1118 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 7, 1, 63] } },
|
| 1119 |
+
"attrs": {},
|
| 1120 |
+
"bench": { "metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1)" }] }
|
| 1121 |
+
},
|
| 1122 |
+
{
|
| 1123 |
+
"name": "pointwise_zeros_uint8_int8_x1w0_b1c4m1n1",
|
| 1124 |
+
"inputs": {
|
| 1125 |
+
"x": {
|
| 1126 |
+
"dtype": "uint8",
|
| 1127 |
+
"shape": [1, 4, 1, 1],
|
| 1128 |
+
"data": { "kind": "cycle", "values": [0, 255, 1, 128, 127, 254, 63] }
|
| 1129 |
+
},
|
| 1130 |
+
"w": {
|
| 1131 |
+
"dtype": "int8",
|
| 1132 |
+
"shape": [1, 4, 1, 1],
|
| 1133 |
+
"data": { "kind": "cycle", "values": [-1, 0, 1, -127, 63, -128, 127] }
|
| 1134 |
+
},
|
| 1135 |
+
"x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "constant", "value": 251 } }
|
| 1136 |
+
},
|
| 1137 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 1, 1, 1] } },
|
| 1138 |
+
"attrs": {},
|
| 1139 |
+
"bench": { "metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1)" }] }
|
| 1140 |
+
},
|
| 1141 |
+
{
|
| 1142 |
+
"name": "pointwise_zeros_uint8_int8_x1w0_b1c4m7n63",
|
| 1143 |
+
"inputs": {
|
| 1144 |
+
"x": {
|
| 1145 |
+
"dtype": "uint8",
|
| 1146 |
+
"shape": [1, 4, 1, 63],
|
| 1147 |
+
"data": { "kind": "cycle", "values": [0, 255, 1, 128, 127, 254, 63] }
|
| 1148 |
+
},
|
| 1149 |
+
"w": {
|
| 1150 |
+
"dtype": "int8",
|
| 1151 |
+
"shape": [7, 4, 1, 1],
|
| 1152 |
+
"data": { "kind": "cycle", "values": [-1, 0, 1, -127, 63, -128, 127] }
|
| 1153 |
+
},
|
| 1154 |
+
"x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "constant", "value": 251 } }
|
| 1155 |
+
},
|
| 1156 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 7, 1, 63] } },
|
| 1157 |
+
"attrs": {},
|
| 1158 |
+
"bench": { "metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1)" }] }
|
| 1159 |
+
},
|
| 1160 |
+
{
|
| 1161 |
+
"name": "pointwise_zeros_uint8_int8_x0w1_b1c4m1n1",
|
| 1162 |
+
"inputs": {
|
| 1163 |
+
"x": {
|
| 1164 |
+
"dtype": "uint8",
|
| 1165 |
+
"shape": [1, 4, 1, 1],
|
| 1166 |
+
"data": { "kind": "cycle", "values": [0, 255, 1, 128, 127, 254, 63] }
|
| 1167 |
+
},
|
| 1168 |
+
"w": {
|
| 1169 |
+
"dtype": "int8",
|
| 1170 |
+
"shape": [1, 4, 1, 1],
|
| 1171 |
+
"data": { "kind": "cycle", "values": [-1, 0, 1, -127, 63, -128, 127] }
|
| 1172 |
+
},
|
| 1173 |
+
"w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "constant", "value": 119 } }
|
| 1174 |
+
},
|
| 1175 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 1, 1, 1] } },
|
| 1176 |
+
"attrs": {},
|
| 1177 |
+
"bench": { "metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1)" }] }
|
| 1178 |
+
},
|
| 1179 |
+
{
|
| 1180 |
+
"name": "pointwise_zeros_uint8_int8_x0w1_b1c4m7n63",
|
| 1181 |
+
"inputs": {
|
| 1182 |
+
"x": {
|
| 1183 |
+
"dtype": "uint8",
|
| 1184 |
+
"shape": [1, 4, 1, 63],
|
| 1185 |
+
"data": { "kind": "cycle", "values": [0, 255, 1, 128, 127, 254, 63] }
|
| 1186 |
+
},
|
| 1187 |
+
"w": {
|
| 1188 |
+
"dtype": "int8",
|
| 1189 |
+
"shape": [7, 4, 1, 1],
|
| 1190 |
+
"data": { "kind": "cycle", "values": [-1, 0, 1, -127, 63, -128, 127] }
|
| 1191 |
+
},
|
| 1192 |
+
"w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "constant", "value": 119 } }
|
| 1193 |
+
},
|
| 1194 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 7, 1, 63] } },
|
| 1195 |
+
"attrs": {},
|
| 1196 |
+
"bench": { "metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1)" }] }
|
| 1197 |
+
},
|
| 1198 |
+
{
|
| 1199 |
+
"name": "pointwise_zeros_uint8_int8_x0w0_b1c4m1n1",
|
| 1200 |
+
"inputs": {
|
| 1201 |
+
"x": {
|
| 1202 |
+
"dtype": "uint8",
|
| 1203 |
+
"shape": [1, 4, 1, 1],
|
| 1204 |
+
"data": { "kind": "cycle", "values": [0, 255, 1, 128, 127, 254, 63] }
|
| 1205 |
+
},
|
| 1206 |
+
"w": {
|
| 1207 |
+
"dtype": "int8",
|
| 1208 |
+
"shape": [1, 4, 1, 1],
|
| 1209 |
+
"data": { "kind": "cycle", "values": [-1, 0, 1, -127, 63, -128, 127] }
|
| 1210 |
+
}
|
| 1211 |
+
},
|
| 1212 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 1, 1, 1] } },
|
| 1213 |
+
"attrs": {},
|
| 1214 |
+
"bench": { "metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1)" }] }
|
| 1215 |
+
},
|
| 1216 |
+
{
|
| 1217 |
+
"name": "pointwise_zeros_uint8_int8_x0w0_b1c4m7n63",
|
| 1218 |
+
"inputs": {
|
| 1219 |
+
"x": {
|
| 1220 |
+
"dtype": "uint8",
|
| 1221 |
+
"shape": [1, 4, 1, 63],
|
| 1222 |
+
"data": { "kind": "cycle", "values": [0, 255, 1, 128, 127, 254, 63] }
|
| 1223 |
+
},
|
| 1224 |
+
"w": {
|
| 1225 |
+
"dtype": "int8",
|
| 1226 |
+
"shape": [7, 4, 1, 1],
|
| 1227 |
+
"data": { "kind": "cycle", "values": [-1, 0, 1, -127, 63, -128, 127] }
|
| 1228 |
+
}
|
| 1229 |
+
},
|
| 1230 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 7, 1, 63] } },
|
| 1231 |
+
"attrs": {},
|
| 1232 |
+
"bench": { "metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1)" }] }
|
| 1233 |
+
},
|
| 1234 |
+
{
|
| 1235 |
+
"name": "pointwise_zeros_int8_uint8_x1w0_b1c4m1n1",
|
| 1236 |
+
"inputs": {
|
| 1237 |
+
"x": {
|
| 1238 |
+
"dtype": "int8",
|
| 1239 |
+
"shape": [1, 4, 1, 1],
|
| 1240 |
+
"data": { "kind": "cycle", "values": [-128, 127, -1, 0, 1, -127, 63] }
|
| 1241 |
+
},
|
| 1242 |
+
"w": {
|
| 1243 |
+
"dtype": "uint8",
|
| 1244 |
+
"shape": [1, 4, 1, 1],
|
| 1245 |
+
"data": { "kind": "cycle", "values": [1, 128, 127, 254, 63, 0, 255] }
|
| 1246 |
+
},
|
| 1247 |
+
"x_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "constant", "value": -121 } }
|
| 1248 |
+
},
|
| 1249 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 1, 1, 1] } },
|
| 1250 |
+
"attrs": {},
|
| 1251 |
+
"bench": { "metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1)" }] }
|
| 1252 |
+
},
|
| 1253 |
+
{
|
| 1254 |
+
"name": "pointwise_zeros_int8_uint8_x1w0_b1c4m7n63",
|
| 1255 |
+
"inputs": {
|
| 1256 |
+
"x": {
|
| 1257 |
+
"dtype": "int8",
|
| 1258 |
+
"shape": [1, 4, 1, 63],
|
| 1259 |
+
"data": { "kind": "cycle", "values": [-128, 127, -1, 0, 1, -127, 63] }
|
| 1260 |
+
},
|
| 1261 |
+
"w": {
|
| 1262 |
+
"dtype": "uint8",
|
| 1263 |
+
"shape": [7, 4, 1, 1],
|
| 1264 |
+
"data": { "kind": "cycle", "values": [1, 128, 127, 254, 63, 0, 255] }
|
| 1265 |
+
},
|
| 1266 |
+
"x_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "constant", "value": -121 } }
|
| 1267 |
+
},
|
| 1268 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 7, 1, 63] } },
|
| 1269 |
+
"attrs": {},
|
| 1270 |
+
"bench": { "metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1)" }] }
|
| 1271 |
+
},
|
| 1272 |
+
{
|
| 1273 |
+
"name": "pointwise_zeros_int8_uint8_x0w1_b1c4m1n1",
|
| 1274 |
+
"inputs": {
|
| 1275 |
+
"x": {
|
| 1276 |
+
"dtype": "int8",
|
| 1277 |
+
"shape": [1, 4, 1, 1],
|
| 1278 |
+
"data": { "kind": "cycle", "values": [-128, 127, -1, 0, 1, -127, 63] }
|
| 1279 |
+
},
|
| 1280 |
+
"w": {
|
| 1281 |
+
"dtype": "uint8",
|
| 1282 |
+
"shape": [1, 4, 1, 1],
|
| 1283 |
+
"data": { "kind": "cycle", "values": [1, 128, 127, 254, 63, 0, 255] }
|
| 1284 |
+
},
|
| 1285 |
+
"w_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "constant", "value": 253 } }
|
| 1286 |
+
},
|
| 1287 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 1, 1, 1] } },
|
| 1288 |
+
"attrs": {},
|
| 1289 |
+
"bench": { "metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1)" }] }
|
| 1290 |
+
},
|
| 1291 |
+
{
|
| 1292 |
+
"name": "pointwise_zeros_int8_uint8_x0w1_b1c4m7n63",
|
| 1293 |
+
"inputs": {
|
| 1294 |
+
"x": {
|
| 1295 |
+
"dtype": "int8",
|
| 1296 |
+
"shape": [1, 4, 1, 63],
|
| 1297 |
+
"data": { "kind": "cycle", "values": [-128, 127, -1, 0, 1, -127, 63] }
|
| 1298 |
+
},
|
| 1299 |
+
"w": {
|
| 1300 |
+
"dtype": "uint8",
|
| 1301 |
+
"shape": [7, 4, 1, 1],
|
| 1302 |
+
"data": { "kind": "cycle", "values": [1, 128, 127, 254, 63, 0, 255] }
|
| 1303 |
+
},
|
| 1304 |
+
"w_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "constant", "value": 253 } }
|
| 1305 |
+
},
|
| 1306 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 7, 1, 63] } },
|
| 1307 |
+
"attrs": {},
|
| 1308 |
+
"bench": { "metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1)" }] }
|
| 1309 |
+
},
|
| 1310 |
+
{
|
| 1311 |
+
"name": "pointwise_zeros_int8_uint8_x0w0_b1c4m1n1",
|
| 1312 |
+
"inputs": {
|
| 1313 |
+
"x": {
|
| 1314 |
+
"dtype": "int8",
|
| 1315 |
+
"shape": [1, 4, 1, 1],
|
| 1316 |
+
"data": { "kind": "cycle", "values": [-128, 127, -1, 0, 1, -127, 63] }
|
| 1317 |
+
},
|
| 1318 |
+
"w": {
|
| 1319 |
+
"dtype": "uint8",
|
| 1320 |
+
"shape": [1, 4, 1, 1],
|
| 1321 |
+
"data": { "kind": "cycle", "values": [1, 128, 127, 254, 63, 0, 255] }
|
| 1322 |
+
}
|
| 1323 |
+
},
|
| 1324 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 1, 1, 1] } },
|
| 1325 |
+
"attrs": {},
|
| 1326 |
+
"bench": { "metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1)" }] }
|
| 1327 |
+
},
|
| 1328 |
+
{
|
| 1329 |
+
"name": "pointwise_zeros_int8_uint8_x0w0_b1c4m7n63",
|
| 1330 |
+
"inputs": {
|
| 1331 |
+
"x": {
|
| 1332 |
+
"dtype": "int8",
|
| 1333 |
+
"shape": [1, 4, 1, 63],
|
| 1334 |
+
"data": { "kind": "cycle", "values": [-128, 127, -1, 0, 1, -127, 63] }
|
| 1335 |
+
},
|
| 1336 |
+
"w": {
|
| 1337 |
+
"dtype": "uint8",
|
| 1338 |
+
"shape": [7, 4, 1, 1],
|
| 1339 |
+
"data": { "kind": "cycle", "values": [1, 128, 127, 254, 63, 0, 255] }
|
| 1340 |
+
}
|
| 1341 |
+
},
|
| 1342 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 7, 1, 63] } },
|
| 1343 |
+
"attrs": {},
|
| 1344 |
+
"bench": { "metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1)" }] }
|
| 1345 |
+
},
|
| 1346 |
+
{
|
| 1347 |
+
"name": "pointwise_zeros_int8_int8_x1w0_b1c4m1n1",
|
| 1348 |
+
"inputs": {
|
| 1349 |
+
"x": {
|
| 1350 |
+
"dtype": "int8",
|
| 1351 |
+
"shape": [1, 4, 1, 1],
|
| 1352 |
+
"data": { "kind": "cycle", "values": [-128, 127, -1, 0, 1, -127, 63] }
|
| 1353 |
+
},
|
| 1354 |
+
"w": {
|
| 1355 |
+
"dtype": "int8",
|
| 1356 |
+
"shape": [1, 4, 1, 1],
|
| 1357 |
+
"data": { "kind": "cycle", "values": [-1, 0, 1, -127, 63, -128, 127] }
|
| 1358 |
+
},
|
| 1359 |
+
"x_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "constant", "value": -121 } }
|
| 1360 |
+
},
|
| 1361 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 1, 1, 1] } },
|
| 1362 |
+
"attrs": {},
|
| 1363 |
+
"bench": { "metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1)" }] }
|
| 1364 |
+
},
|
| 1365 |
+
{
|
| 1366 |
+
"name": "pointwise_zeros_int8_int8_x1w0_b1c4m7n63",
|
| 1367 |
+
"inputs": {
|
| 1368 |
+
"x": {
|
| 1369 |
+
"dtype": "int8",
|
| 1370 |
+
"shape": [1, 4, 1, 63],
|
| 1371 |
+
"data": { "kind": "cycle", "values": [-128, 127, -1, 0, 1, -127, 63] }
|
| 1372 |
+
},
|
| 1373 |
+
"w": {
|
| 1374 |
+
"dtype": "int8",
|
| 1375 |
+
"shape": [7, 4, 1, 1],
|
| 1376 |
+
"data": { "kind": "cycle", "values": [-1, 0, 1, -127, 63, -128, 127] }
|
| 1377 |
+
},
|
| 1378 |
+
"x_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "constant", "value": -121 } }
|
| 1379 |
+
},
|
| 1380 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 7, 1, 63] } },
|
| 1381 |
+
"attrs": {},
|
| 1382 |
+
"bench": { "metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1)" }] }
|
| 1383 |
+
},
|
| 1384 |
+
{
|
| 1385 |
+
"name": "pointwise_zeros_int8_int8_x0w1_b1c4m1n1",
|
| 1386 |
+
"inputs": {
|
| 1387 |
+
"x": {
|
| 1388 |
+
"dtype": "int8",
|
| 1389 |
+
"shape": [1, 4, 1, 1],
|
| 1390 |
+
"data": { "kind": "cycle", "values": [-128, 127, -1, 0, 1, -127, 63] }
|
| 1391 |
+
},
|
| 1392 |
+
"w": {
|
| 1393 |
+
"dtype": "int8",
|
| 1394 |
+
"shape": [1, 4, 1, 1],
|
| 1395 |
+
"data": { "kind": "cycle", "values": [-1, 0, 1, -127, 63, -128, 127] }
|
| 1396 |
+
},
|
| 1397 |
+
"w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "constant", "value": 119 } }
|
| 1398 |
+
},
|
| 1399 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 1, 1, 1] } },
|
| 1400 |
+
"attrs": {},
|
| 1401 |
+
"bench": { "metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1)" }] }
|
| 1402 |
+
},
|
| 1403 |
+
{
|
| 1404 |
+
"name": "pointwise_zeros_int8_int8_x0w1_b1c4m7n63",
|
| 1405 |
+
"inputs": {
|
| 1406 |
+
"x": {
|
| 1407 |
+
"dtype": "int8",
|
| 1408 |
+
"shape": [1, 4, 1, 63],
|
| 1409 |
+
"data": { "kind": "cycle", "values": [-128, 127, -1, 0, 1, -127, 63] }
|
| 1410 |
+
},
|
| 1411 |
+
"w": {
|
| 1412 |
+
"dtype": "int8",
|
| 1413 |
+
"shape": [7, 4, 1, 1],
|
| 1414 |
+
"data": { "kind": "cycle", "values": [-1, 0, 1, -127, 63, -128, 127] }
|
| 1415 |
+
},
|
| 1416 |
+
"w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "constant", "value": 119 } }
|
| 1417 |
+
},
|
| 1418 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 7, 1, 63] } },
|
| 1419 |
+
"attrs": {},
|
| 1420 |
+
"bench": { "metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1)" }] }
|
| 1421 |
+
},
|
| 1422 |
+
{
|
| 1423 |
+
"name": "pointwise_zeros_int8_int8_x0w0_b1c4m1n1",
|
| 1424 |
+
"inputs": {
|
| 1425 |
+
"x": {
|
| 1426 |
+
"dtype": "int8",
|
| 1427 |
+
"shape": [1, 4, 1, 1],
|
| 1428 |
+
"data": { "kind": "cycle", "values": [-128, 127, -1, 0, 1, -127, 63] }
|
| 1429 |
+
},
|
| 1430 |
+
"w": {
|
| 1431 |
+
"dtype": "int8",
|
| 1432 |
+
"shape": [1, 4, 1, 1],
|
| 1433 |
+
"data": { "kind": "cycle", "values": [-1, 0, 1, -127, 63, -128, 127] }
|
| 1434 |
+
}
|
| 1435 |
+
},
|
| 1436 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 1, 1, 1] } },
|
| 1437 |
+
"attrs": {},
|
| 1438 |
+
"bench": { "metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1)" }] }
|
| 1439 |
+
},
|
| 1440 |
+
{
|
| 1441 |
+
"name": "pointwise_zeros_int8_int8_x0w0_b1c4m7n63",
|
| 1442 |
+
"inputs": {
|
| 1443 |
+
"x": {
|
| 1444 |
+
"dtype": "int8",
|
| 1445 |
+
"shape": [1, 4, 1, 63],
|
| 1446 |
+
"data": { "kind": "cycle", "values": [-128, 127, -1, 0, 1, -127, 63] }
|
| 1447 |
+
},
|
| 1448 |
+
"w": {
|
| 1449 |
+
"dtype": "int8",
|
| 1450 |
+
"shape": [7, 4, 1, 1],
|
| 1451 |
+
"data": { "kind": "cycle", "values": [-1, 0, 1, -127, 63, -128, 127] }
|
| 1452 |
+
}
|
| 1453 |
+
},
|
| 1454 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 7, 1, 63] } },
|
| 1455 |
+
"attrs": {},
|
| 1456 |
+
"bench": { "metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1)" }] }
|
| 1457 |
+
},
|
| 1458 |
+
{
|
| 1459 |
+
"name": "conv1d_u8s8_pointwise_1x64x56x56_oc128",
|
| 1460 |
+
"inputs": {
|
| 1461 |
+
"x": { "dtype": "uint8", "shape": [1, 64, 3136], "data": { "kind": "constant", "value": 127 } },
|
| 1462 |
+
"w": { "dtype": "int8", "shape": [128, 64, 1], "data": { "kind": "constant", "value": -3 } },
|
| 1463 |
+
"x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } },
|
| 1464 |
+
"w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }
|
| 1465 |
+
},
|
| 1466 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 128, 3136] } },
|
| 1467 |
+
"bench": {
|
| 1468 |
+
"metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1) * dim(shapes.w, 2)" }]
|
| 1469 |
+
},
|
| 1470 |
+
"attrs": {}
|
| 1471 |
+
},
|
| 1472 |
+
{
|
| 1473 |
+
"name": "conv1d_u8s8_pointwise_unalignedC_c66_oc128_56x56_scalar",
|
| 1474 |
+
"preset": "smoke",
|
| 1475 |
+
"inputs": {
|
| 1476 |
+
"x": { "dtype": "uint8", "shape": [1, 66, 3136], "data": { "kind": "constant", "value": 127 } },
|
| 1477 |
+
"w": { "dtype": "int8", "shape": [128, 66, 1], "data": { "kind": "constant", "value": -3 } },
|
| 1478 |
+
"x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } },
|
| 1479 |
+
"w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }
|
| 1480 |
+
},
|
| 1481 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 128, 3136] } },
|
| 1482 |
+
"bench": {
|
| 1483 |
+
"metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1) * dim(shapes.w, 2)" }]
|
| 1484 |
+
},
|
| 1485 |
+
"attrs": {}
|
| 1486 |
+
},
|
| 1487 |
+
{
|
| 1488 |
+
"name": "conv1d_u8s8_pointwise_gemv_alignedN_n2048_c256_dp4a",
|
| 1489 |
+
"preset": "smoke",
|
| 1490 |
+
"inputs": {
|
| 1491 |
+
"x": { "dtype": "uint8", "shape": [1, 256, 1], "data": { "kind": "constant", "value": 127 } },
|
| 1492 |
+
"w": { "dtype": "int8", "shape": [2048, 256, 1], "data": { "kind": "constant", "value": -3 } },
|
| 1493 |
+
"x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } },
|
| 1494 |
+
"w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }
|
| 1495 |
+
},
|
| 1496 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 2048, 1] } },
|
| 1497 |
+
"bench": {
|
| 1498 |
+
"metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1) * dim(shapes.w, 2)" }]
|
| 1499 |
+
},
|
| 1500 |
+
"attrs": {}
|
| 1501 |
+
},
|
| 1502 |
+
{
|
| 1503 |
+
"name": "conv1d_u8s8_pointwise_gemv_unalignedN_n2050_c256_dp4a",
|
| 1504 |
+
"preset": "smoke",
|
| 1505 |
+
"inputs": {
|
| 1506 |
+
"x": { "dtype": "uint8", "shape": [1, 256, 1], "data": { "kind": "constant", "value": 127 } },
|
| 1507 |
+
"w": { "dtype": "int8", "shape": [2050, 256, 1], "data": { "kind": "constant", "value": -3 } },
|
| 1508 |
+
"x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } },
|
| 1509 |
+
"w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "values", "values": [0] } }
|
| 1510 |
+
},
|
| 1511 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 2050, 1] } },
|
| 1512 |
+
"bench": {
|
| 1513 |
+
"metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1) * dim(shapes.w, 2)" }]
|
| 1514 |
+
},
|
| 1515 |
+
"attrs": {}
|
| 1516 |
+
},
|
| 1517 |
+
{
|
| 1518 |
+
"name": "conv1d_u8s8_pointwise_1x64x56x56_oc128_wzp_omitted_pathology",
|
| 1519 |
+
"preset": "smoke",
|
| 1520 |
+
"inputs": {
|
| 1521 |
+
"x": { "dtype": "uint8", "shape": [1, 64, 3136], "data": { "kind": "constant", "value": 127 } },
|
| 1522 |
+
"w": { "dtype": "int8", "shape": [128, 64, 1], "data": { "kind": "constant", "value": -3 } },
|
| 1523 |
+
"x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "values", "values": [128] } }
|
| 1524 |
+
},
|
| 1525 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 128, 3136] } },
|
| 1526 |
+
"bench": {
|
| 1527 |
+
"metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1) * dim(shapes.w, 2)" }]
|
| 1528 |
+
},
|
| 1529 |
+
"attrs": {}
|
| 1530 |
+
},
|
| 1531 |
+
{
|
| 1532 |
+
"name": "conv1d_pointwise_zeros_uint8_int8_x1w0_b1c64m128n3136",
|
| 1533 |
+
"inputs": {
|
| 1534 |
+
"x": {
|
| 1535 |
+
"dtype": "uint8",
|
| 1536 |
+
"shape": [1, 64, 3136],
|
| 1537 |
+
"data": { "kind": "cycle", "values": [0, 255, 1, 128, 127, 254, 63] }
|
| 1538 |
+
},
|
| 1539 |
+
"w": {
|
| 1540 |
+
"dtype": "int8",
|
| 1541 |
+
"shape": [128, 64, 1],
|
| 1542 |
+
"data": { "kind": "cycle", "values": [-1, 0, 1, -127, 63, -128, 127] }
|
| 1543 |
+
},
|
| 1544 |
+
"x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "constant", "value": 251 } }
|
| 1545 |
+
},
|
| 1546 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 128, 3136] } },
|
| 1547 |
+
"attrs": {},
|
| 1548 |
+
"bench": {
|
| 1549 |
+
"metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1) * dim(shapes.w, 2)" }]
|
| 1550 |
+
}
|
| 1551 |
+
},
|
| 1552 |
+
{
|
| 1553 |
+
"name": "conv1d_pointwise_zeros_uint8_int8_x1w0_b2c66m129n65",
|
| 1554 |
+
"inputs": {
|
| 1555 |
+
"x": {
|
| 1556 |
+
"dtype": "uint8",
|
| 1557 |
+
"shape": [2, 66, 65],
|
| 1558 |
+
"data": { "kind": "cycle", "values": [0, 255, 1, 128, 127, 254, 63] }
|
| 1559 |
+
},
|
| 1560 |
+
"w": {
|
| 1561 |
+
"dtype": "int8",
|
| 1562 |
+
"shape": [129, 66, 1],
|
| 1563 |
+
"data": { "kind": "cycle", "values": [-1, 0, 1, -127, 63, -128, 127] }
|
| 1564 |
+
},
|
| 1565 |
+
"x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "constant", "value": 251 } }
|
| 1566 |
+
},
|
| 1567 |
+
"outputs": { "y": { "dtype": "int32", "shape": [2, 129, 65] } },
|
| 1568 |
+
"attrs": {},
|
| 1569 |
+
"bench": {
|
| 1570 |
+
"metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1) * dim(shapes.w, 2)" }]
|
| 1571 |
+
}
|
| 1572 |
+
},
|
| 1573 |
+
{
|
| 1574 |
+
"name": "conv1d_pointwise_zeros_uint8_int8_x0w1_b1c64m128n3136",
|
| 1575 |
+
"inputs": {
|
| 1576 |
+
"x": {
|
| 1577 |
+
"dtype": "uint8",
|
| 1578 |
+
"shape": [1, 64, 3136],
|
| 1579 |
+
"data": { "kind": "cycle", "values": [0, 255, 1, 128, 127, 254, 63] }
|
| 1580 |
+
},
|
| 1581 |
+
"w": {
|
| 1582 |
+
"dtype": "int8",
|
| 1583 |
+
"shape": [128, 64, 1],
|
| 1584 |
+
"data": { "kind": "cycle", "values": [-1, 0, 1, -127, 63, -128, 127] }
|
| 1585 |
+
},
|
| 1586 |
+
"w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "constant", "value": 119 } }
|
| 1587 |
+
},
|
| 1588 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 128, 3136] } },
|
| 1589 |
+
"attrs": {},
|
| 1590 |
+
"bench": {
|
| 1591 |
+
"metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1) * dim(shapes.w, 2)" }]
|
| 1592 |
+
}
|
| 1593 |
+
},
|
| 1594 |
+
{
|
| 1595 |
+
"name": "conv1d_pointwise_zeros_uint8_int8_x0w1_b2c66m129n65",
|
| 1596 |
+
"inputs": {
|
| 1597 |
+
"x": {
|
| 1598 |
+
"dtype": "uint8",
|
| 1599 |
+
"shape": [2, 66, 65],
|
| 1600 |
+
"data": { "kind": "cycle", "values": [0, 255, 1, 128, 127, 254, 63] }
|
| 1601 |
+
},
|
| 1602 |
+
"w": {
|
| 1603 |
+
"dtype": "int8",
|
| 1604 |
+
"shape": [129, 66, 1],
|
| 1605 |
+
"data": { "kind": "cycle", "values": [-1, 0, 1, -127, 63, -128, 127] }
|
| 1606 |
+
},
|
| 1607 |
+
"w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "constant", "value": 119 } }
|
| 1608 |
+
},
|
| 1609 |
+
"outputs": { "y": { "dtype": "int32", "shape": [2, 129, 65] } },
|
| 1610 |
+
"attrs": {},
|
| 1611 |
+
"bench": {
|
| 1612 |
+
"metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1) * dim(shapes.w, 2)" }]
|
| 1613 |
+
}
|
| 1614 |
+
},
|
| 1615 |
+
{
|
| 1616 |
+
"name": "conv1d_pointwise_zeros_uint8_int8_x0w0_b1c64m128n3136",
|
| 1617 |
+
"inputs": {
|
| 1618 |
+
"x": {
|
| 1619 |
+
"dtype": "uint8",
|
| 1620 |
+
"shape": [1, 64, 3136],
|
| 1621 |
+
"data": { "kind": "cycle", "values": [0, 255, 1, 128, 127, 254, 63] }
|
| 1622 |
+
},
|
| 1623 |
+
"w": {
|
| 1624 |
+
"dtype": "int8",
|
| 1625 |
+
"shape": [128, 64, 1],
|
| 1626 |
+
"data": { "kind": "cycle", "values": [-1, 0, 1, -127, 63, -128, 127] }
|
| 1627 |
+
}
|
| 1628 |
+
},
|
| 1629 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 128, 3136] } },
|
| 1630 |
+
"attrs": {},
|
| 1631 |
+
"bench": {
|
| 1632 |
+
"metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1) * dim(shapes.w, 2)" }]
|
| 1633 |
+
}
|
| 1634 |
+
},
|
| 1635 |
+
{
|
| 1636 |
+
"name": "conv1d_pointwise_zeros_uint8_int8_x0w0_b2c66m129n65",
|
| 1637 |
+
"inputs": {
|
| 1638 |
+
"x": {
|
| 1639 |
+
"dtype": "uint8",
|
| 1640 |
+
"shape": [2, 66, 65],
|
| 1641 |
+
"data": { "kind": "cycle", "values": [0, 255, 1, 128, 127, 254, 63] }
|
| 1642 |
+
},
|
| 1643 |
+
"w": {
|
| 1644 |
+
"dtype": "int8",
|
| 1645 |
+
"shape": [129, 66, 1],
|
| 1646 |
+
"data": { "kind": "cycle", "values": [-1, 0, 1, -127, 63, -128, 127] }
|
| 1647 |
+
}
|
| 1648 |
+
},
|
| 1649 |
+
"outputs": { "y": { "dtype": "int32", "shape": [2, 129, 65] } },
|
| 1650 |
+
"attrs": {},
|
| 1651 |
+
"bench": {
|
| 1652 |
+
"metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1) * dim(shapes.w, 2)" }]
|
| 1653 |
+
}
|
| 1654 |
+
},
|
| 1655 |
+
{
|
| 1656 |
+
"name": "conv1d_pointwise_zeros_int8_int8_x0w0_b1c64m128n3136",
|
| 1657 |
+
"inputs": {
|
| 1658 |
+
"x": {
|
| 1659 |
+
"dtype": "int8",
|
| 1660 |
+
"shape": [1, 64, 3136],
|
| 1661 |
+
"data": { "kind": "cycle", "values": [-128, 127, -1, 0, 1, -127, 63] }
|
| 1662 |
+
},
|
| 1663 |
+
"w": {
|
| 1664 |
+
"dtype": "int8",
|
| 1665 |
+
"shape": [128, 64, 1],
|
| 1666 |
+
"data": { "kind": "cycle", "values": [-1, 0, 1, -127, 63, -128, 127] }
|
| 1667 |
+
}
|
| 1668 |
+
},
|
| 1669 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 128, 3136] } },
|
| 1670 |
+
"attrs": {},
|
| 1671 |
+
"bench": {
|
| 1672 |
+
"metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1) * dim(shapes.w, 2)" }]
|
| 1673 |
+
}
|
| 1674 |
+
},
|
| 1675 |
+
{
|
| 1676 |
+
"name": "conv1d_pointwise_zeros_int8_int8_x0w0_b2c66m129n65",
|
| 1677 |
+
"inputs": {
|
| 1678 |
+
"x": {
|
| 1679 |
+
"dtype": "int8",
|
| 1680 |
+
"shape": [2, 66, 65],
|
| 1681 |
+
"data": { "kind": "cycle", "values": [-128, 127, -1, 0, 1, -127, 63] }
|
| 1682 |
+
},
|
| 1683 |
+
"w": {
|
| 1684 |
+
"dtype": "int8",
|
| 1685 |
+
"shape": [129, 66, 1],
|
| 1686 |
+
"data": { "kind": "cycle", "values": [-1, 0, 1, -127, 63, -128, 127] }
|
| 1687 |
+
}
|
| 1688 |
+
},
|
| 1689 |
+
"outputs": { "y": { "dtype": "int32", "shape": [2, 129, 65] } },
|
| 1690 |
+
"attrs": {},
|
| 1691 |
+
"bench": {
|
| 1692 |
+
"metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1) * dim(shapes.w, 2)" }]
|
| 1693 |
+
}
|
| 1694 |
+
},
|
| 1695 |
+
{
|
| 1696 |
+
"name": "conv1d_pointwise_zeros_int8_uint8_x0w0_b1c64m128n3136",
|
| 1697 |
+
"inputs": {
|
| 1698 |
+
"x": {
|
| 1699 |
+
"dtype": "int8",
|
| 1700 |
+
"shape": [1, 64, 3136],
|
| 1701 |
+
"data": { "kind": "cycle", "values": [-128, 127, -1, 0, 1, -127, 63] }
|
| 1702 |
+
},
|
| 1703 |
+
"w": {
|
| 1704 |
+
"dtype": "uint8",
|
| 1705 |
+
"shape": [128, 64, 1],
|
| 1706 |
+
"data": { "kind": "cycle", "values": [1, 128, 127, 254, 63, 0, 255] }
|
| 1707 |
+
}
|
| 1708 |
+
},
|
| 1709 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 128, 3136] } },
|
| 1710 |
+
"attrs": {},
|
| 1711 |
+
"bench": {
|
| 1712 |
+
"metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1) * dim(shapes.w, 2)" }]
|
| 1713 |
+
}
|
| 1714 |
+
},
|
| 1715 |
+
{
|
| 1716 |
+
"name": "conv1d_pointwise_zeros_int8_uint8_x0w0_b2c66m129n65",
|
| 1717 |
+
"inputs": {
|
| 1718 |
+
"x": {
|
| 1719 |
+
"dtype": "int8",
|
| 1720 |
+
"shape": [2, 66, 65],
|
| 1721 |
+
"data": { "kind": "cycle", "values": [-128, 127, -1, 0, 1, -127, 63] }
|
| 1722 |
+
},
|
| 1723 |
+
"w": {
|
| 1724 |
+
"dtype": "uint8",
|
| 1725 |
+
"shape": [129, 66, 1],
|
| 1726 |
+
"data": { "kind": "cycle", "values": [1, 128, 127, 254, 63, 0, 255] }
|
| 1727 |
+
}
|
| 1728 |
+
},
|
| 1729 |
+
"outputs": { "y": { "dtype": "int32", "shape": [2, 129, 65] } },
|
| 1730 |
+
"attrs": {},
|
| 1731 |
+
"bench": {
|
| 1732 |
+
"metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1) * dim(shapes.w, 2)" }]
|
| 1733 |
+
}
|
| 1734 |
+
},
|
| 1735 |
+
{
|
| 1736 |
+
"name": "conv1d_pointwise_zeros_uint8_uint8_x0w0_b1c64m128n3136",
|
| 1737 |
+
"inputs": {
|
| 1738 |
+
"x": {
|
| 1739 |
+
"dtype": "uint8",
|
| 1740 |
+
"shape": [1, 64, 3136],
|
| 1741 |
+
"data": { "kind": "cycle", "values": [0, 255, 1, 128, 127, 254, 63] }
|
| 1742 |
+
},
|
| 1743 |
+
"w": {
|
| 1744 |
+
"dtype": "uint8",
|
| 1745 |
+
"shape": [128, 64, 1],
|
| 1746 |
+
"data": { "kind": "cycle", "values": [1, 128, 127, 254, 63, 0, 255] }
|
| 1747 |
+
}
|
| 1748 |
+
},
|
| 1749 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 128, 3136] } },
|
| 1750 |
+
"attrs": {},
|
| 1751 |
+
"bench": {
|
| 1752 |
+
"metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1) * dim(shapes.w, 2)" }]
|
| 1753 |
+
}
|
| 1754 |
+
},
|
| 1755 |
+
{
|
| 1756 |
+
"name": "conv1d_pointwise_zeros_uint8_uint8_x0w0_b2c66m129n65",
|
| 1757 |
+
"inputs": {
|
| 1758 |
+
"x": {
|
| 1759 |
+
"dtype": "uint8",
|
| 1760 |
+
"shape": [2, 66, 65],
|
| 1761 |
+
"data": { "kind": "cycle", "values": [0, 255, 1, 128, 127, 254, 63] }
|
| 1762 |
+
},
|
| 1763 |
+
"w": {
|
| 1764 |
+
"dtype": "uint8",
|
| 1765 |
+
"shape": [129, 66, 1],
|
| 1766 |
+
"data": { "kind": "cycle", "values": [1, 128, 127, 254, 63, 0, 255] }
|
| 1767 |
+
}
|
| 1768 |
+
},
|
| 1769 |
+
"outputs": { "y": { "dtype": "int32", "shape": [2, 129, 65] } },
|
| 1770 |
+
"attrs": {},
|
| 1771 |
+
"bench": {
|
| 1772 |
+
"metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1) * dim(shapes.w, 2)" }]
|
| 1773 |
+
}
|
| 1774 |
+
},
|
| 1775 |
+
{
|
| 1776 |
+
"name": "conv1d_per_channel_uint8_int8_x1_b1c64m128n3136",
|
| 1777 |
+
"inputs": {
|
| 1778 |
+
"x": {
|
| 1779 |
+
"dtype": "uint8",
|
| 1780 |
+
"shape": [1, 64, 3136],
|
| 1781 |
+
"data": { "kind": "cycle", "values": [0, 255, 1, 128, 127, 254, 63] }
|
| 1782 |
+
},
|
| 1783 |
+
"w": {
|
| 1784 |
+
"dtype": "int8",
|
| 1785 |
+
"shape": [128, 64, 1],
|
| 1786 |
+
"data": { "kind": "cycle", "values": [-1, 0, 1, -127, 63, -128, 127] }
|
| 1787 |
+
},
|
| 1788 |
+
"x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "constant", "value": 251 } },
|
| 1789 |
+
"w_zero_point": {
|
| 1790 |
+
"dtype": "int8",
|
| 1791 |
+
"shape": [128],
|
| 1792 |
+
"data": { "kind": "cycle", "values": [-128, 127, -1, 0, 1] }
|
| 1793 |
+
}
|
| 1794 |
+
},
|
| 1795 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 128, 3136] } },
|
| 1796 |
+
"attrs": {},
|
| 1797 |
+
"bench": {
|
| 1798 |
+
"metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1) * dim(shapes.w, 2)" }]
|
| 1799 |
+
}
|
| 1800 |
+
},
|
| 1801 |
+
{
|
| 1802 |
+
"name": "conv1d_per_channel_uint8_int8_x1_b2c66m129n65",
|
| 1803 |
+
"inputs": {
|
| 1804 |
+
"x": {
|
| 1805 |
+
"dtype": "uint8",
|
| 1806 |
+
"shape": [2, 66, 65],
|
| 1807 |
+
"data": { "kind": "cycle", "values": [0, 255, 1, 128, 127, 254, 63] }
|
| 1808 |
+
},
|
| 1809 |
+
"w": {
|
| 1810 |
+
"dtype": "int8",
|
| 1811 |
+
"shape": [129, 66, 1],
|
| 1812 |
+
"data": { "kind": "cycle", "values": [-1, 0, 1, -127, 63, -128, 127] }
|
| 1813 |
+
},
|
| 1814 |
+
"x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "constant", "value": 251 } },
|
| 1815 |
+
"w_zero_point": {
|
| 1816 |
+
"dtype": "int8",
|
| 1817 |
+
"shape": [129],
|
| 1818 |
+
"data": { "kind": "cycle", "values": [-128, 127, -1, 0, 1] }
|
| 1819 |
+
}
|
| 1820 |
+
},
|
| 1821 |
+
"outputs": { "y": { "dtype": "int32", "shape": [2, 129, 65] } },
|
| 1822 |
+
"attrs": {},
|
| 1823 |
+
"bench": {
|
| 1824 |
+
"metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1) * dim(shapes.w, 2)" }]
|
| 1825 |
+
}
|
| 1826 |
+
},
|
| 1827 |
+
{
|
| 1828 |
+
"name": "conv1d_per_channel_uint8_int8_x0_b1c64m128n3136",
|
| 1829 |
+
"inputs": {
|
| 1830 |
+
"x": {
|
| 1831 |
+
"dtype": "uint8",
|
| 1832 |
+
"shape": [1, 64, 3136],
|
| 1833 |
+
"data": { "kind": "cycle", "values": [0, 255, 1, 128, 127, 254, 63] }
|
| 1834 |
+
},
|
| 1835 |
+
"w": {
|
| 1836 |
+
"dtype": "int8",
|
| 1837 |
+
"shape": [128, 64, 1],
|
| 1838 |
+
"data": { "kind": "cycle", "values": [-1, 0, 1, -127, 63, -128, 127] }
|
| 1839 |
+
},
|
| 1840 |
+
"w_zero_point": {
|
| 1841 |
+
"dtype": "int8",
|
| 1842 |
+
"shape": [128],
|
| 1843 |
+
"data": { "kind": "cycle", "values": [-128, 127, -1, 0, 1] }
|
| 1844 |
+
}
|
| 1845 |
+
},
|
| 1846 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 128, 3136] } },
|
| 1847 |
+
"attrs": {},
|
| 1848 |
+
"bench": {
|
| 1849 |
+
"metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1) * dim(shapes.w, 2)" }]
|
| 1850 |
+
}
|
| 1851 |
+
},
|
| 1852 |
+
{
|
| 1853 |
+
"name": "conv1d_per_channel_uint8_int8_x0_b2c66m129n65",
|
| 1854 |
+
"inputs": {
|
| 1855 |
+
"x": {
|
| 1856 |
+
"dtype": "uint8",
|
| 1857 |
+
"shape": [2, 66, 65],
|
| 1858 |
+
"data": { "kind": "cycle", "values": [0, 255, 1, 128, 127, 254, 63] }
|
| 1859 |
+
},
|
| 1860 |
+
"w": {
|
| 1861 |
+
"dtype": "int8",
|
| 1862 |
+
"shape": [129, 66, 1],
|
| 1863 |
+
"data": { "kind": "cycle", "values": [-1, 0, 1, -127, 63, -128, 127] }
|
| 1864 |
+
},
|
| 1865 |
+
"w_zero_point": {
|
| 1866 |
+
"dtype": "int8",
|
| 1867 |
+
"shape": [129],
|
| 1868 |
+
"data": { "kind": "cycle", "values": [-128, 127, -1, 0, 1] }
|
| 1869 |
+
}
|
| 1870 |
+
},
|
| 1871 |
+
"outputs": { "y": { "dtype": "int32", "shape": [2, 129, 65] } },
|
| 1872 |
+
"attrs": {},
|
| 1873 |
+
"bench": {
|
| 1874 |
+
"metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1) * dim(shapes.w, 2)" }]
|
| 1875 |
+
}
|
| 1876 |
+
},
|
| 1877 |
+
{
|
| 1878 |
+
"name": "conv1d_pointwise_zeros_uint8_uint8_x1w0_b1c4m1n1",
|
| 1879 |
+
"inputs": {
|
| 1880 |
+
"x": {
|
| 1881 |
+
"dtype": "uint8",
|
| 1882 |
+
"shape": [1, 4, 1],
|
| 1883 |
+
"data": { "kind": "cycle", "values": [0, 255, 1, 128, 127, 254, 63] }
|
| 1884 |
+
},
|
| 1885 |
+
"w": {
|
| 1886 |
+
"dtype": "uint8",
|
| 1887 |
+
"shape": [1, 4, 1],
|
| 1888 |
+
"data": { "kind": "cycle", "values": [1, 128, 127, 254, 63, 0, 255] }
|
| 1889 |
+
},
|
| 1890 |
+
"x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "constant", "value": 251 } }
|
| 1891 |
+
},
|
| 1892 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 1, 1] } },
|
| 1893 |
+
"attrs": {},
|
| 1894 |
+
"bench": {
|
| 1895 |
+
"metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1) * dim(shapes.w, 2)" }]
|
| 1896 |
+
}
|
| 1897 |
+
},
|
| 1898 |
+
{
|
| 1899 |
+
"name": "conv1d_pointwise_zeros_uint8_uint8_x1w0_b1c4m7n63",
|
| 1900 |
+
"inputs": {
|
| 1901 |
+
"x": {
|
| 1902 |
+
"dtype": "uint8",
|
| 1903 |
+
"shape": [1, 4, 63],
|
| 1904 |
+
"data": { "kind": "cycle", "values": [0, 255, 1, 128, 127, 254, 63] }
|
| 1905 |
+
},
|
| 1906 |
+
"w": {
|
| 1907 |
+
"dtype": "uint8",
|
| 1908 |
+
"shape": [7, 4, 1],
|
| 1909 |
+
"data": { "kind": "cycle", "values": [1, 128, 127, 254, 63, 0, 255] }
|
| 1910 |
+
},
|
| 1911 |
+
"x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "constant", "value": 251 } }
|
| 1912 |
+
},
|
| 1913 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 7, 63] } },
|
| 1914 |
+
"attrs": {},
|
| 1915 |
+
"bench": {
|
| 1916 |
+
"metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1) * dim(shapes.w, 2)" }]
|
| 1917 |
+
}
|
| 1918 |
+
},
|
| 1919 |
+
{
|
| 1920 |
+
"name": "conv1d_pointwise_zeros_uint8_uint8_x0w1_b1c4m1n1",
|
| 1921 |
+
"inputs": {
|
| 1922 |
+
"x": {
|
| 1923 |
+
"dtype": "uint8",
|
| 1924 |
+
"shape": [1, 4, 1],
|
| 1925 |
+
"data": { "kind": "cycle", "values": [0, 255, 1, 128, 127, 254, 63] }
|
| 1926 |
+
},
|
| 1927 |
+
"w": {
|
| 1928 |
+
"dtype": "uint8",
|
| 1929 |
+
"shape": [1, 4, 1],
|
| 1930 |
+
"data": { "kind": "cycle", "values": [1, 128, 127, 254, 63, 0, 255] }
|
| 1931 |
+
},
|
| 1932 |
+
"w_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "constant", "value": 253 } }
|
| 1933 |
+
},
|
| 1934 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 1, 1] } },
|
| 1935 |
+
"attrs": {},
|
| 1936 |
+
"bench": {
|
| 1937 |
+
"metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1) * dim(shapes.w, 2)" }]
|
| 1938 |
+
}
|
| 1939 |
+
},
|
| 1940 |
+
{
|
| 1941 |
+
"name": "conv1d_pointwise_zeros_uint8_uint8_x0w1_b1c4m7n63",
|
| 1942 |
+
"inputs": {
|
| 1943 |
+
"x": {
|
| 1944 |
+
"dtype": "uint8",
|
| 1945 |
+
"shape": [1, 4, 63],
|
| 1946 |
+
"data": { "kind": "cycle", "values": [0, 255, 1, 128, 127, 254, 63] }
|
| 1947 |
+
},
|
| 1948 |
+
"w": {
|
| 1949 |
+
"dtype": "uint8",
|
| 1950 |
+
"shape": [7, 4, 1],
|
| 1951 |
+
"data": { "kind": "cycle", "values": [1, 128, 127, 254, 63, 0, 255] }
|
| 1952 |
+
},
|
| 1953 |
+
"w_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "constant", "value": 253 } }
|
| 1954 |
+
},
|
| 1955 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 7, 63] } },
|
| 1956 |
+
"attrs": {},
|
| 1957 |
+
"bench": {
|
| 1958 |
+
"metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1) * dim(shapes.w, 2)" }]
|
| 1959 |
+
}
|
| 1960 |
+
},
|
| 1961 |
+
{
|
| 1962 |
+
"name": "conv1d_pointwise_zeros_uint8_uint8_x0w0_b1c4m1n1",
|
| 1963 |
+
"inputs": {
|
| 1964 |
+
"x": {
|
| 1965 |
+
"dtype": "uint8",
|
| 1966 |
+
"shape": [1, 4, 1],
|
| 1967 |
+
"data": { "kind": "cycle", "values": [0, 255, 1, 128, 127, 254, 63] }
|
| 1968 |
+
},
|
| 1969 |
+
"w": {
|
| 1970 |
+
"dtype": "uint8",
|
| 1971 |
+
"shape": [1, 4, 1],
|
| 1972 |
+
"data": { "kind": "cycle", "values": [1, 128, 127, 254, 63, 0, 255] }
|
| 1973 |
+
}
|
| 1974 |
+
},
|
| 1975 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 1, 1] } },
|
| 1976 |
+
"attrs": {},
|
| 1977 |
+
"bench": {
|
| 1978 |
+
"metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1) * dim(shapes.w, 2)" }]
|
| 1979 |
+
}
|
| 1980 |
+
},
|
| 1981 |
+
{
|
| 1982 |
+
"name": "conv1d_pointwise_zeros_uint8_uint8_x0w0_b1c4m7n63",
|
| 1983 |
+
"inputs": {
|
| 1984 |
+
"x": {
|
| 1985 |
+
"dtype": "uint8",
|
| 1986 |
+
"shape": [1, 4, 63],
|
| 1987 |
+
"data": { "kind": "cycle", "values": [0, 255, 1, 128, 127, 254, 63] }
|
| 1988 |
+
},
|
| 1989 |
+
"w": {
|
| 1990 |
+
"dtype": "uint8",
|
| 1991 |
+
"shape": [7, 4, 1],
|
| 1992 |
+
"data": { "kind": "cycle", "values": [1, 128, 127, 254, 63, 0, 255] }
|
| 1993 |
+
}
|
| 1994 |
+
},
|
| 1995 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 7, 63] } },
|
| 1996 |
+
"attrs": {},
|
| 1997 |
+
"bench": {
|
| 1998 |
+
"metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1) * dim(shapes.w, 2)" }]
|
| 1999 |
+
}
|
| 2000 |
+
},
|
| 2001 |
+
{
|
| 2002 |
+
"name": "conv1d_pointwise_zeros_uint8_int8_x1w0_b1c4m1n1",
|
| 2003 |
+
"inputs": {
|
| 2004 |
+
"x": {
|
| 2005 |
+
"dtype": "uint8",
|
| 2006 |
+
"shape": [1, 4, 1],
|
| 2007 |
+
"data": { "kind": "cycle", "values": [0, 255, 1, 128, 127, 254, 63] }
|
| 2008 |
+
},
|
| 2009 |
+
"w": {
|
| 2010 |
+
"dtype": "int8",
|
| 2011 |
+
"shape": [1, 4, 1],
|
| 2012 |
+
"data": { "kind": "cycle", "values": [-1, 0, 1, -127, 63, -128, 127] }
|
| 2013 |
+
},
|
| 2014 |
+
"x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "constant", "value": 251 } }
|
| 2015 |
+
},
|
| 2016 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 1, 1] } },
|
| 2017 |
+
"attrs": {},
|
| 2018 |
+
"bench": {
|
| 2019 |
+
"metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1) * dim(shapes.w, 2)" }]
|
| 2020 |
+
}
|
| 2021 |
+
},
|
| 2022 |
+
{
|
| 2023 |
+
"name": "conv1d_pointwise_zeros_uint8_int8_x1w0_b1c4m7n63",
|
| 2024 |
+
"inputs": {
|
| 2025 |
+
"x": {
|
| 2026 |
+
"dtype": "uint8",
|
| 2027 |
+
"shape": [1, 4, 63],
|
| 2028 |
+
"data": { "kind": "cycle", "values": [0, 255, 1, 128, 127, 254, 63] }
|
| 2029 |
+
},
|
| 2030 |
+
"w": {
|
| 2031 |
+
"dtype": "int8",
|
| 2032 |
+
"shape": [7, 4, 1],
|
| 2033 |
+
"data": { "kind": "cycle", "values": [-1, 0, 1, -127, 63, -128, 127] }
|
| 2034 |
+
},
|
| 2035 |
+
"x_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "constant", "value": 251 } }
|
| 2036 |
+
},
|
| 2037 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 7, 63] } },
|
| 2038 |
+
"attrs": {},
|
| 2039 |
+
"bench": {
|
| 2040 |
+
"metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1) * dim(shapes.w, 2)" }]
|
| 2041 |
+
}
|
| 2042 |
+
},
|
| 2043 |
+
{
|
| 2044 |
+
"name": "conv1d_pointwise_zeros_uint8_int8_x0w1_b1c4m1n1",
|
| 2045 |
+
"inputs": {
|
| 2046 |
+
"x": {
|
| 2047 |
+
"dtype": "uint8",
|
| 2048 |
+
"shape": [1, 4, 1],
|
| 2049 |
+
"data": { "kind": "cycle", "values": [0, 255, 1, 128, 127, 254, 63] }
|
| 2050 |
+
},
|
| 2051 |
+
"w": {
|
| 2052 |
+
"dtype": "int8",
|
| 2053 |
+
"shape": [1, 4, 1],
|
| 2054 |
+
"data": { "kind": "cycle", "values": [-1, 0, 1, -127, 63, -128, 127] }
|
| 2055 |
+
},
|
| 2056 |
+
"w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "constant", "value": 119 } }
|
| 2057 |
+
},
|
| 2058 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 1, 1] } },
|
| 2059 |
+
"attrs": {},
|
| 2060 |
+
"bench": {
|
| 2061 |
+
"metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1) * dim(shapes.w, 2)" }]
|
| 2062 |
+
}
|
| 2063 |
+
},
|
| 2064 |
+
{
|
| 2065 |
+
"name": "conv1d_pointwise_zeros_uint8_int8_x0w1_b1c4m7n63",
|
| 2066 |
+
"inputs": {
|
| 2067 |
+
"x": {
|
| 2068 |
+
"dtype": "uint8",
|
| 2069 |
+
"shape": [1, 4, 63],
|
| 2070 |
+
"data": { "kind": "cycle", "values": [0, 255, 1, 128, 127, 254, 63] }
|
| 2071 |
+
},
|
| 2072 |
+
"w": {
|
| 2073 |
+
"dtype": "int8",
|
| 2074 |
+
"shape": [7, 4, 1],
|
| 2075 |
+
"data": { "kind": "cycle", "values": [-1, 0, 1, -127, 63, -128, 127] }
|
| 2076 |
+
},
|
| 2077 |
+
"w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "constant", "value": 119 } }
|
| 2078 |
+
},
|
| 2079 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 7, 63] } },
|
| 2080 |
+
"attrs": {},
|
| 2081 |
+
"bench": {
|
| 2082 |
+
"metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1) * dim(shapes.w, 2)" }]
|
| 2083 |
+
}
|
| 2084 |
+
},
|
| 2085 |
+
{
|
| 2086 |
+
"name": "conv1d_pointwise_zeros_uint8_int8_x0w0_b1c4m1n1",
|
| 2087 |
+
"inputs": {
|
| 2088 |
+
"x": {
|
| 2089 |
+
"dtype": "uint8",
|
| 2090 |
+
"shape": [1, 4, 1],
|
| 2091 |
+
"data": { "kind": "cycle", "values": [0, 255, 1, 128, 127, 254, 63] }
|
| 2092 |
+
},
|
| 2093 |
+
"w": {
|
| 2094 |
+
"dtype": "int8",
|
| 2095 |
+
"shape": [1, 4, 1],
|
| 2096 |
+
"data": { "kind": "cycle", "values": [-1, 0, 1, -127, 63, -128, 127] }
|
| 2097 |
+
}
|
| 2098 |
+
},
|
| 2099 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 1, 1] } },
|
| 2100 |
+
"attrs": {},
|
| 2101 |
+
"bench": {
|
| 2102 |
+
"metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1) * dim(shapes.w, 2)" }]
|
| 2103 |
+
}
|
| 2104 |
+
},
|
| 2105 |
+
{
|
| 2106 |
+
"name": "conv1d_pointwise_zeros_uint8_int8_x0w0_b1c4m7n63",
|
| 2107 |
+
"inputs": {
|
| 2108 |
+
"x": {
|
| 2109 |
+
"dtype": "uint8",
|
| 2110 |
+
"shape": [1, 4, 63],
|
| 2111 |
+
"data": { "kind": "cycle", "values": [0, 255, 1, 128, 127, 254, 63] }
|
| 2112 |
+
},
|
| 2113 |
+
"w": {
|
| 2114 |
+
"dtype": "int8",
|
| 2115 |
+
"shape": [7, 4, 1],
|
| 2116 |
+
"data": { "kind": "cycle", "values": [-1, 0, 1, -127, 63, -128, 127] }
|
| 2117 |
+
}
|
| 2118 |
+
},
|
| 2119 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 7, 63] } },
|
| 2120 |
+
"attrs": {},
|
| 2121 |
+
"bench": {
|
| 2122 |
+
"metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1) * dim(shapes.w, 2)" }]
|
| 2123 |
+
}
|
| 2124 |
+
},
|
| 2125 |
+
{
|
| 2126 |
+
"name": "conv1d_pointwise_zeros_int8_uint8_x1w0_b1c4m1n1",
|
| 2127 |
+
"inputs": {
|
| 2128 |
+
"x": {
|
| 2129 |
+
"dtype": "int8",
|
| 2130 |
+
"shape": [1, 4, 1],
|
| 2131 |
+
"data": { "kind": "cycle", "values": [-128, 127, -1, 0, 1, -127, 63] }
|
| 2132 |
+
},
|
| 2133 |
+
"w": {
|
| 2134 |
+
"dtype": "uint8",
|
| 2135 |
+
"shape": [1, 4, 1],
|
| 2136 |
+
"data": { "kind": "cycle", "values": [1, 128, 127, 254, 63, 0, 255] }
|
| 2137 |
+
},
|
| 2138 |
+
"x_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "constant", "value": -121 } }
|
| 2139 |
+
},
|
| 2140 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 1, 1] } },
|
| 2141 |
+
"attrs": {},
|
| 2142 |
+
"bench": {
|
| 2143 |
+
"metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1) * dim(shapes.w, 2)" }]
|
| 2144 |
+
}
|
| 2145 |
+
},
|
| 2146 |
+
{
|
| 2147 |
+
"name": "conv1d_pointwise_zeros_int8_uint8_x1w0_b1c4m7n63",
|
| 2148 |
+
"inputs": {
|
| 2149 |
+
"x": {
|
| 2150 |
+
"dtype": "int8",
|
| 2151 |
+
"shape": [1, 4, 63],
|
| 2152 |
+
"data": { "kind": "cycle", "values": [-128, 127, -1, 0, 1, -127, 63] }
|
| 2153 |
+
},
|
| 2154 |
+
"w": {
|
| 2155 |
+
"dtype": "uint8",
|
| 2156 |
+
"shape": [7, 4, 1],
|
| 2157 |
+
"data": { "kind": "cycle", "values": [1, 128, 127, 254, 63, 0, 255] }
|
| 2158 |
+
},
|
| 2159 |
+
"x_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "constant", "value": -121 } }
|
| 2160 |
+
},
|
| 2161 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 7, 63] } },
|
| 2162 |
+
"attrs": {},
|
| 2163 |
+
"bench": {
|
| 2164 |
+
"metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1) * dim(shapes.w, 2)" }]
|
| 2165 |
+
}
|
| 2166 |
+
},
|
| 2167 |
+
{
|
| 2168 |
+
"name": "conv1d_pointwise_zeros_int8_uint8_x0w1_b1c4m1n1",
|
| 2169 |
+
"inputs": {
|
| 2170 |
+
"x": {
|
| 2171 |
+
"dtype": "int8",
|
| 2172 |
+
"shape": [1, 4, 1],
|
| 2173 |
+
"data": { "kind": "cycle", "values": [-128, 127, -1, 0, 1, -127, 63] }
|
| 2174 |
+
},
|
| 2175 |
+
"w": {
|
| 2176 |
+
"dtype": "uint8",
|
| 2177 |
+
"shape": [1, 4, 1],
|
| 2178 |
+
"data": { "kind": "cycle", "values": [1, 128, 127, 254, 63, 0, 255] }
|
| 2179 |
+
},
|
| 2180 |
+
"w_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "constant", "value": 253 } }
|
| 2181 |
+
},
|
| 2182 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 1, 1] } },
|
| 2183 |
+
"attrs": {},
|
| 2184 |
+
"bench": {
|
| 2185 |
+
"metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1) * dim(shapes.w, 2)" }]
|
| 2186 |
+
}
|
| 2187 |
+
},
|
| 2188 |
+
{
|
| 2189 |
+
"name": "conv1d_pointwise_zeros_int8_uint8_x0w1_b1c4m7n63",
|
| 2190 |
+
"inputs": {
|
| 2191 |
+
"x": {
|
| 2192 |
+
"dtype": "int8",
|
| 2193 |
+
"shape": [1, 4, 63],
|
| 2194 |
+
"data": { "kind": "cycle", "values": [-128, 127, -1, 0, 1, -127, 63] }
|
| 2195 |
+
},
|
| 2196 |
+
"w": {
|
| 2197 |
+
"dtype": "uint8",
|
| 2198 |
+
"shape": [7, 4, 1],
|
| 2199 |
+
"data": { "kind": "cycle", "values": [1, 128, 127, 254, 63, 0, 255] }
|
| 2200 |
+
},
|
| 2201 |
+
"w_zero_point": { "dtype": "uint8", "shape": [1], "data": { "kind": "constant", "value": 253 } }
|
| 2202 |
+
},
|
| 2203 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 7, 63] } },
|
| 2204 |
+
"attrs": {},
|
| 2205 |
+
"bench": {
|
| 2206 |
+
"metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1) * dim(shapes.w, 2)" }]
|
| 2207 |
+
}
|
| 2208 |
+
},
|
| 2209 |
+
{
|
| 2210 |
+
"name": "conv1d_pointwise_zeros_int8_uint8_x0w0_b1c4m1n1",
|
| 2211 |
+
"inputs": {
|
| 2212 |
+
"x": {
|
| 2213 |
+
"dtype": "int8",
|
| 2214 |
+
"shape": [1, 4, 1],
|
| 2215 |
+
"data": { "kind": "cycle", "values": [-128, 127, -1, 0, 1, -127, 63] }
|
| 2216 |
+
},
|
| 2217 |
+
"w": {
|
| 2218 |
+
"dtype": "uint8",
|
| 2219 |
+
"shape": [1, 4, 1],
|
| 2220 |
+
"data": { "kind": "cycle", "values": [1, 128, 127, 254, 63, 0, 255] }
|
| 2221 |
+
}
|
| 2222 |
+
},
|
| 2223 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 1, 1] } },
|
| 2224 |
+
"attrs": {},
|
| 2225 |
+
"bench": {
|
| 2226 |
+
"metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1) * dim(shapes.w, 2)" }]
|
| 2227 |
+
}
|
| 2228 |
+
},
|
| 2229 |
+
{
|
| 2230 |
+
"name": "conv1d_pointwise_zeros_int8_uint8_x0w0_b1c4m7n63",
|
| 2231 |
+
"inputs": {
|
| 2232 |
+
"x": {
|
| 2233 |
+
"dtype": "int8",
|
| 2234 |
+
"shape": [1, 4, 63],
|
| 2235 |
+
"data": { "kind": "cycle", "values": [-128, 127, -1, 0, 1, -127, 63] }
|
| 2236 |
+
},
|
| 2237 |
+
"w": {
|
| 2238 |
+
"dtype": "uint8",
|
| 2239 |
+
"shape": [7, 4, 1],
|
| 2240 |
+
"data": { "kind": "cycle", "values": [1, 128, 127, 254, 63, 0, 255] }
|
| 2241 |
+
}
|
| 2242 |
+
},
|
| 2243 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 7, 63] } },
|
| 2244 |
+
"attrs": {},
|
| 2245 |
+
"bench": {
|
| 2246 |
+
"metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1) * dim(shapes.w, 2)" }]
|
| 2247 |
+
}
|
| 2248 |
+
},
|
| 2249 |
+
{
|
| 2250 |
+
"name": "conv1d_pointwise_zeros_int8_int8_x1w0_b1c4m1n1",
|
| 2251 |
+
"inputs": {
|
| 2252 |
+
"x": {
|
| 2253 |
+
"dtype": "int8",
|
| 2254 |
+
"shape": [1, 4, 1],
|
| 2255 |
+
"data": { "kind": "cycle", "values": [-128, 127, -1, 0, 1, -127, 63] }
|
| 2256 |
+
},
|
| 2257 |
+
"w": {
|
| 2258 |
+
"dtype": "int8",
|
| 2259 |
+
"shape": [1, 4, 1],
|
| 2260 |
+
"data": { "kind": "cycle", "values": [-1, 0, 1, -127, 63, -128, 127] }
|
| 2261 |
+
},
|
| 2262 |
+
"x_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "constant", "value": -121 } }
|
| 2263 |
+
},
|
| 2264 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 1, 1] } },
|
| 2265 |
+
"attrs": {},
|
| 2266 |
+
"bench": {
|
| 2267 |
+
"metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1) * dim(shapes.w, 2)" }]
|
| 2268 |
+
}
|
| 2269 |
+
},
|
| 2270 |
+
{
|
| 2271 |
+
"name": "conv1d_pointwise_zeros_int8_int8_x1w0_b1c4m7n63",
|
| 2272 |
+
"inputs": {
|
| 2273 |
+
"x": {
|
| 2274 |
+
"dtype": "int8",
|
| 2275 |
+
"shape": [1, 4, 63],
|
| 2276 |
+
"data": { "kind": "cycle", "values": [-128, 127, -1, 0, 1, -127, 63] }
|
| 2277 |
+
},
|
| 2278 |
+
"w": {
|
| 2279 |
+
"dtype": "int8",
|
| 2280 |
+
"shape": [7, 4, 1],
|
| 2281 |
+
"data": { "kind": "cycle", "values": [-1, 0, 1, -127, 63, -128, 127] }
|
| 2282 |
+
},
|
| 2283 |
+
"x_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "constant", "value": -121 } }
|
| 2284 |
+
},
|
| 2285 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 7, 63] } },
|
| 2286 |
+
"attrs": {},
|
| 2287 |
+
"bench": {
|
| 2288 |
+
"metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1) * dim(shapes.w, 2)" }]
|
| 2289 |
+
}
|
| 2290 |
+
},
|
| 2291 |
+
{
|
| 2292 |
+
"name": "conv1d_pointwise_zeros_int8_int8_x0w1_b1c4m1n1",
|
| 2293 |
+
"inputs": {
|
| 2294 |
+
"x": {
|
| 2295 |
+
"dtype": "int8",
|
| 2296 |
+
"shape": [1, 4, 1],
|
| 2297 |
+
"data": { "kind": "cycle", "values": [-128, 127, -1, 0, 1, -127, 63] }
|
| 2298 |
+
},
|
| 2299 |
+
"w": {
|
| 2300 |
+
"dtype": "int8",
|
| 2301 |
+
"shape": [1, 4, 1],
|
| 2302 |
+
"data": { "kind": "cycle", "values": [-1, 0, 1, -127, 63, -128, 127] }
|
| 2303 |
+
},
|
| 2304 |
+
"w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "constant", "value": 119 } }
|
| 2305 |
+
},
|
| 2306 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 1, 1] } },
|
| 2307 |
+
"attrs": {},
|
| 2308 |
+
"bench": {
|
| 2309 |
+
"metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1) * dim(shapes.w, 2)" }]
|
| 2310 |
+
}
|
| 2311 |
+
},
|
| 2312 |
+
{
|
| 2313 |
+
"name": "conv1d_pointwise_zeros_int8_int8_x0w1_b1c4m7n63",
|
| 2314 |
+
"inputs": {
|
| 2315 |
+
"x": {
|
| 2316 |
+
"dtype": "int8",
|
| 2317 |
+
"shape": [1, 4, 63],
|
| 2318 |
+
"data": { "kind": "cycle", "values": [-128, 127, -1, 0, 1, -127, 63] }
|
| 2319 |
+
},
|
| 2320 |
+
"w": {
|
| 2321 |
+
"dtype": "int8",
|
| 2322 |
+
"shape": [7, 4, 1],
|
| 2323 |
+
"data": { "kind": "cycle", "values": [-1, 0, 1, -127, 63, -128, 127] }
|
| 2324 |
+
},
|
| 2325 |
+
"w_zero_point": { "dtype": "int8", "shape": [1], "data": { "kind": "constant", "value": 119 } }
|
| 2326 |
+
},
|
| 2327 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 7, 63] } },
|
| 2328 |
+
"attrs": {},
|
| 2329 |
+
"bench": {
|
| 2330 |
+
"metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1) * dim(shapes.w, 2)" }]
|
| 2331 |
+
}
|
| 2332 |
+
},
|
| 2333 |
+
{
|
| 2334 |
+
"name": "conv1d_pointwise_zeros_int8_int8_x0w0_b1c4m1n1",
|
| 2335 |
+
"inputs": {
|
| 2336 |
+
"x": {
|
| 2337 |
+
"dtype": "int8",
|
| 2338 |
+
"shape": [1, 4, 1],
|
| 2339 |
+
"data": { "kind": "cycle", "values": [-128, 127, -1, 0, 1, -127, 63] }
|
| 2340 |
+
},
|
| 2341 |
+
"w": {
|
| 2342 |
+
"dtype": "int8",
|
| 2343 |
+
"shape": [1, 4, 1],
|
| 2344 |
+
"data": { "kind": "cycle", "values": [-1, 0, 1, -127, 63, -128, 127] }
|
| 2345 |
+
}
|
| 2346 |
+
},
|
| 2347 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 1, 1] } },
|
| 2348 |
+
"attrs": {},
|
| 2349 |
+
"bench": {
|
| 2350 |
+
"metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1) * dim(shapes.w, 2)" }]
|
| 2351 |
+
}
|
| 2352 |
+
},
|
| 2353 |
+
{
|
| 2354 |
+
"name": "conv1d_pointwise_zeros_int8_int8_x0w0_b1c4m7n63",
|
| 2355 |
+
"inputs": {
|
| 2356 |
+
"x": {
|
| 2357 |
+
"dtype": "int8",
|
| 2358 |
+
"shape": [1, 4, 63],
|
| 2359 |
+
"data": { "kind": "cycle", "values": [-128, 127, -1, 0, 1, -127, 63] }
|
| 2360 |
+
},
|
| 2361 |
+
"w": {
|
| 2362 |
+
"dtype": "int8",
|
| 2363 |
+
"shape": [7, 4, 1],
|
| 2364 |
+
"data": { "kind": "cycle", "values": [-1, 0, 1, -127, 63, -128, 127] }
|
| 2365 |
+
}
|
| 2366 |
+
},
|
| 2367 |
+
"outputs": { "y": { "dtype": "int32", "shape": [1, 7, 63] } },
|
| 2368 |
+
"attrs": {},
|
| 2369 |
+
"bench": {
|
| 2370 |
+
"metrics": [{ "type": "gflops", "value": "2 * numel(shapes.y) * dim(shapes.w, 1) * dim(shapes.w, 2)" }]
|
| 2371 |
+
}
|
| 2372 |
}
|
| 2373 |
]
|
| 2374 |
}
|
build/webgpu/conv-int-accumulate-spatial.wgsl.jinja
CHANGED
|
@@ -1,36 +1,41 @@
|
|
| 1 |
-
{% macro
|
| 2 |
-
{
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
{
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
{%
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
{%
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
{%
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
{%
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
// 2D-folded flat index: gid.y carries the high bits past the dispatch's
|
| 19 |
// per-axis workgroup fold width.
|
| 20 |
-
{
|
| 21 |
-
{
|
| 22 |
-
let {{ name }} = gid.x + gid.y * {{ DISPATCH_FOLD_WIDTH }}u * {{ tunables.WORKGROUP_SIZE }}u;
|
| 23 |
-
{%- elif guardInline %}
|
| 24 |
-
let {{ name }} = gid.x + gid.y * {{ DISPATCH_FOLD_WIDTH }}u * {{ tunables.WORKGROUP_SIZE }}u;
|
| 25 |
-
if ({{ name }} >= {{ bound }}) { return; }
|
| 26 |
-
{%- else %}
|
| 27 |
-
let {{ name }} = gid.x + gid.y * {{ DISPATCH_FOLD_WIDTH }}u * {{ tunables.WORKGROUP_SIZE }}u;
|
| 28 |
-
if ({{ name }} >= {{ bound }}) {
|
| 29 |
-
return;
|
| 30 |
-
}
|
| 31 |
-
{%- endif %}
|
| 32 |
-
{% endmacro %}
|
| 33 |
-
|
| 34 |
{{ env.wgsl.resourceDeclarations }}
|
| 35 |
|
| 36 |
fn read_x(index: u32) -> i32 {
|
|
@@ -49,38 +54,14 @@ fn read_w(index: u32) -> i32 {
|
|
| 49 |
{% endif %}
|
| 50 |
}
|
| 51 |
|
| 52 |
-
|
| 53 |
-
{% if xZeroOmitted is defined and xZeroOmitted %}
|
| 54 |
-
return 0;
|
| 55 |
-
{% elif xUnsigned %}
|
| 56 |
-
return i32(x_zero_point[0]);
|
| 57 |
-
{% else %}
|
| 58 |
-
return x_zero_point[0];
|
| 59 |
-
{% endif %}
|
| 60 |
-
}
|
| 61 |
|
| 62 |
// A per-output-channel weight zero point applies at every spatial rank.
|
| 63 |
-
|
| 64 |
-
{% if wZeroOmitted is defined and wZeroOmitted %}
|
| 65 |
-
return 0;
|
| 66 |
-
{% elif wZeroPerChannel %}
|
| 67 |
-
{% if wUnsigned %}
|
| 68 |
-
return i32(w_zero_point[oc]);
|
| 69 |
-
{% else %}
|
| 70 |
-
return w_zero_point[oc];
|
| 71 |
-
{% endif %}
|
| 72 |
-
{% else %}
|
| 73 |
-
{% if wUnsigned %}
|
| 74 |
-
return i32(w_zero_point[0]);
|
| 75 |
-
{% else %}
|
| 76 |
-
return w_zero_point[0];
|
| 77 |
-
{% endif %}
|
| 78 |
-
{% endif %}
|
| 79 |
-
}
|
| 80 |
|
| 81 |
@compute @workgroup_size({{ tunables.WORKGROUP_SIZE }})
|
| 82 |
fn main(@builtin(global_invocation_id) gid: vec3<u32>) {
|
| 83 |
-
{{ flat_index_2d("index", guardInline=true) }}
|
| 84 |
let ow = index % params.outW;
|
| 85 |
var t = index / params.outW;
|
| 86 |
let oh = t % params.outH;
|
|
|
|
| 1 |
+
{% macro quant_read_scalar_zero(fn_name, buffer_name, is_unsigned, present=true) %}
|
| 2 |
+
fn {{ fn_name }}() -> i32 {
|
| 3 |
+
{% if present %}
|
| 4 |
+
{% if is_unsigned %}
|
| 5 |
+
return i32({{ buffer_name }}[0]);
|
| 6 |
+
{% else %}
|
| 7 |
+
return {{ buffer_name }}[0];
|
| 8 |
+
{% endif %}
|
| 9 |
+
{% else %}
|
| 10 |
+
return 0;
|
| 11 |
+
{% endif %}
|
| 12 |
+
}{% endmacro %}
|
| 13 |
+
{% macro quant_read_column_zero(fn_name, buffer_name, is_unsigned, present=true, per_column=false, param_name="col", return_type="i32") %}
|
| 14 |
+
fn {{ fn_name }}({% if per_column %}{{ param_name }}: u32{% endif %}) -> {{ return_type }} {
|
| 15 |
+
{% if present %}
|
| 16 |
+
{% if per_column %}
|
| 17 |
+
{% if is_unsigned %}
|
| 18 |
+
return i32({{ buffer_name }}[{{ param_name }}]);
|
| 19 |
+
{% else %}
|
| 20 |
+
return {{ buffer_name }}[{{ param_name }}];
|
| 21 |
+
{% endif %}
|
| 22 |
+
{% else %}
|
| 23 |
+
{% if is_unsigned %}
|
| 24 |
+
return i32({{ buffer_name }}[0]);
|
| 25 |
+
{% else %}
|
| 26 |
+
return {{ buffer_name }}[0];
|
| 27 |
+
{% endif %}
|
| 28 |
+
{% endif %}
|
| 29 |
+
{% else %}
|
| 30 |
+
return 0;
|
| 31 |
+
{% endif %}
|
| 32 |
+
}{% endmacro %}
|
| 33 |
+
{% macro flat_index_2d(workgroupSize, name="i", bound="params.count", guardInline=false) %}
|
| 34 |
+
{% set wgTerm = workgroupSize ~ "u" if workgroupSize is number else workgroupSize %}
|
| 35 |
// 2D-folded flat index: gid.y carries the high bits past the dispatch's
|
| 36 |
// per-axis workgroup fold width.
|
| 37 |
+
let {{ name }} = gid.x + gid.y * {{ DISPATCH_FOLD_WIDTH }}u * {{ wgTerm }};
|
| 38 |
+
if ({{ name }} >= {{ bound }}) { return; }{% endmacro %}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 39 |
{{ env.wgsl.resourceDeclarations }}
|
| 40 |
|
| 41 |
fn read_x(index: u32) -> i32 {
|
|
|
|
| 54 |
{% endif %}
|
| 55 |
}
|
| 56 |
|
| 57 |
+
{{ quant_read_scalar_zero("read_x_zero", "x_zero_point", xUnsigned, not (xZeroOmitted is defined and xZeroOmitted)) }}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 58 |
|
| 59 |
// A per-output-channel weight zero point applies at every spatial rank.
|
| 60 |
+
{{ quant_read_column_zero("read_w_zero", "w_zero_point", wUnsigned, not (wZeroOmitted is defined and wZeroOmitted), wZeroPerChannel, "oc") }}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 61 |
|
| 62 |
@compute @workgroup_size({{ tunables.WORKGROUP_SIZE }})
|
| 63 |
fn main(@builtin(global_invocation_id) gid: vec3<u32>) {
|
| 64 |
+
{{ flat_index_2d(tunables.WORKGROUP_SIZE, "index", guardInline=true) }}
|
| 65 |
let ow = index % params.outW;
|
| 66 |
var t = index / params.outW;
|
| 67 |
let oh = t % params.outH;
|
build/webgpu/conv-int-im2col-spatial.wgsl.jinja
CHANGED
|
@@ -5,7 +5,11 @@
|
|
| 5 |
* Optional extra K rows contain the raw input zero point to align the DP4A
|
| 6 |
* reduction. */
|
| 7 |
{{ env.wgsl.resourceDeclarations }}
|
| 8 |
-
{% set
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
{% if spatialRankSpec == 3 %}
|
| 10 |
|
| 11 |
const KERNEL_D: u32 = {{ kernelDSpec }}u;
|
|
@@ -27,23 +31,10 @@ const DILATION_H: u32 = {{ dilationHSpec }}u;
|
|
| 27 |
const DILATION_W: u32 = {{ dilationWSpec }}u;
|
| 28 |
const PAD_TOP: i32 = {{ padTopSpec }};
|
| 29 |
const PAD_LEFT: i32 = {{ padLeftSpec }};
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
let
|
| 34 |
-
if (pos >= params.outCount) {
|
| 35 |
-
return;
|
| 36 |
-
}
|
| 37 |
-
let k = gid.y;
|
| 38 |
-
let batch = gid.z;
|
| 39 |
-
{% if padK %}
|
| 40 |
-
if (k >= params.sourceKRows) {
|
| 41 |
-
cols[(batch * params.kRows + k) * params.outCount + pos] = x_zero_point[0];
|
| 42 |
-
return;
|
| 43 |
-
}
|
| 44 |
-
{% endif %}
|
| 45 |
-
let ic = k / KSIZE;
|
| 46 |
-
let kq = k - ic * KSIZE;
|
| 47 |
{% if spatialRankSpec == 3 %}
|
| 48 |
let kd = kq / KERNEL_HW;
|
| 49 |
let khw = kq - kd * KERNEL_HW;
|
|
@@ -63,22 +54,33 @@ fn main(@builtin(global_invocation_id) gid: vec3<u32>) {
|
|
| 63 |
{% endif %}
|
| 64 |
let ih = i32(oh * STRIDE_H + kh * DILATION_H) - PAD_TOP;
|
| 65 |
let iw = i32(ow * STRIDE_W + kw * DILATION_W) - PAD_LEFT;
|
| 66 |
-
var value: {{ bScalar }} =
|
| 67 |
{% if spatialRankSpec == 3 %}
|
| 68 |
if (
|
| 69 |
id >= 0 && id < i32(params.inD)
|
| 70 |
&& ih >= 0 && ih < i32(params.inH)
|
| 71 |
&& iw >= 0 && iw < i32(params.inW)
|
| 72 |
) {
|
| 73 |
-
value =
|
| 74 |
(((batch * params.inChannels + ic) * params.inD + u32(id)) * params.inH + u32(ih))
|
| 75 |
* params.inW + u32(iw)
|
| 76 |
];
|
| 77 |
}
|
| 78 |
{% else %}
|
| 79 |
if (ih >= 0 && ih < i32(params.inH) && iw >= 0 && iw < i32(params.inW)) {
|
| 80 |
-
value =
|
| 81 |
}
|
| 82 |
{% endif %}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 83 |
cols[(batch * params.kRows + k) * params.outCount + pos] = value;
|
| 84 |
}
|
|
|
|
| 5 |
* Optional extra K rows contain the raw input zero point to align the DP4A
|
| 6 |
* reduction. */
|
| 7 |
{{ env.wgsl.resourceDeclarations }}
|
| 8 |
+
{% set kernelDSpec = kernelDSpec | default(1) %}
|
| 9 |
+
{% set strideDSpec = strideDSpec | default(1) %}
|
| 10 |
+
{% set dilationDSpec = dilationDSpec | default(1) %}
|
| 11 |
+
{% set padFrontSpec = padFrontSpec | default(0) %}
|
| 12 |
+
{% macro spatial_constants() %}
|
| 13 |
{% if spatialRankSpec == 3 %}
|
| 14 |
|
| 15 |
const KERNEL_D: u32 = {{ kernelDSpec }}u;
|
|
|
|
| 31 |
const DILATION_W: u32 = {{ dilationWSpec }}u;
|
| 32 |
const PAD_TOP: i32 = {{ padTopSpec }};
|
| 33 |
const PAD_LEFT: i32 = {{ padLeftSpec }};
|
| 34 |
+
{% endmacro %}
|
| 35 |
+
{% macro spatial_sample(value="value", input="x", zero="x_zero_point", sampleK="k", sampleScalar="auto") %}
|
| 36 |
+
let ic = {{ sampleK }} / KSIZE;
|
| 37 |
+
let kq = {{ sampleK }} - ic * KSIZE;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
{% if spatialRankSpec == 3 %}
|
| 39 |
let kd = kq / KERNEL_HW;
|
| 40 |
let khw = kq - kd * KERNEL_HW;
|
|
|
|
| 54 |
{% endif %}
|
| 55 |
let ih = i32(oh * STRIDE_H + kh * DILATION_H) - PAD_TOP;
|
| 56 |
let iw = i32(ow * STRIDE_W + kw * DILATION_W) - PAD_LEFT;
|
| 57 |
+
var {{ value }}: {{ bScalar if sampleScalar == "auto" else sampleScalar }} = {{ zero }}[0];
|
| 58 |
{% if spatialRankSpec == 3 %}
|
| 59 |
if (
|
| 60 |
id >= 0 && id < i32(params.inD)
|
| 61 |
&& ih >= 0 && ih < i32(params.inH)
|
| 62 |
&& iw >= 0 && iw < i32(params.inW)
|
| 63 |
) {
|
| 64 |
+
{{ value }} = {{ input }}[
|
| 65 |
(((batch * params.inChannels + ic) * params.inD + u32(id)) * params.inH + u32(ih))
|
| 66 |
* params.inW + u32(iw)
|
| 67 |
];
|
| 68 |
}
|
| 69 |
{% else %}
|
| 70 |
if (ih >= 0 && ih < i32(params.inH) && iw >= 0 && iw < i32(params.inW)) {
|
| 71 |
+
{{ value }} = {{ input }}[((batch * params.inChannels + ic) * params.inH + u32(ih)) * params.inW + u32(iw)];
|
| 72 |
}
|
| 73 |
{% endif %}
|
| 74 |
+
{% endmacro %}
|
| 75 |
+
{{ spatial_constants() }}
|
| 76 |
+
@compute @workgroup_size({{ tunables.WORKGROUP_SIZE }})
|
| 77 |
+
fn main(@builtin(global_invocation_id) gid: vec3<u32>) {
|
| 78 |
+
let pos = gid.x;
|
| 79 |
+
if (pos >= params.outCount) {
|
| 80 |
+
return;
|
| 81 |
+
}
|
| 82 |
+
let k = gid.y;
|
| 83 |
+
let batch = gid.z;
|
| 84 |
+
{{ spatial_sample() }}
|
| 85 |
cols[(batch * params.kRows + k) * params.outCount + pos] = value;
|
| 86 |
}
|
build/webgpu/manifest.json
CHANGED
|
@@ -80,29 +80,43 @@
|
|
| 80 |
"spatialAttributesOk": "spatialRank >= 1 and spatialRank <= 3 and spatialAttributeLengthsOk and kernelShapeMatchesWeights and kernelExtentsOk and stridesValuesOk and dilationsValuesOk and padsValuesOk and explicitPadsOk",
|
| 81 |
"packedFeature": "device.wgslLanguageFeatures.has(\"packed_4x8_integer_dot_product\")",
|
| 82 |
"rank4TensorOk": "spatialAttributesOk and (ranks.x == 4 and ranks.w == 4 and ranks.y == 4)",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 83 |
"rank5TensorOk": "spatialAttributesOk and (ranks.x == 5 and ranks.w == 5 and ranks.y == 5)",
|
| 84 |
"scalarXZeroOk": "ranks.x_zero_point == 0 or (ranks.x_zero_point == 1 and dim(shapes.x_zero_point, 0) == 1)",
|
| 85 |
"scalarWZeroOk": "ranks.w_zero_point == 0 or (ranks.w_zero_point == 1 and dim(shapes.w_zero_point, 0) == 1)",
|
| 86 |
"scalarXZeroRequiredOk": "present.x_zero_point and scalarXZeroOk",
|
| 87 |
"scalarWZeroRequiredOk": "present.w_zero_point and scalarWZeroOk",
|
| 88 |
-
"outputBatchChannelsOk": "dim(shapes.y, 0) == dim(shapes.x, 0) and dim(shapes.y, 1) == dim(shapes.w, 0)",
|
| 89 |
"ungroupedChannelsOk": "attrs.group == 1 and dim(shapes.w, 1) == dim(shapes.x, 1)",
|
| 90 |
-
"groupChannelsOk": "attrs.group >= 1 and dim(shapes.w, 1) * attrs.group == dim(shapes.x, 1) and dim(shapes.w, 0) % attrs.group == 0",
|
| 91 |
-
"output2dShapeOk": "dim(shapes.y, 2) == expectedOutputHeight and dim(shapes.y, 3) == expectedOutputWidth",
|
| 92 |
"output3dShapeOk": "dim(shapes.y, 2) == expectedOutputDepth and dim(shapes.y, 3) == expectedOutputHeight and dim(shapes.y, 4) == expectedOutputWidth",
|
| 93 |
"rank3TensorOk": "spatialAttributesOk and (ranks.x == 3 and ranks.w == 3 and ranks.y == 3)",
|
| 94 |
"nchwTensorOk": "rank4TensorOk or rank3TensorOk",
|
| 95 |
"output1dShapeOk": "dim(shapes.y, 2) == expectedOutputWidth",
|
| 96 |
"outputSpatialShapeOk": "output2dShapeOk if rank4TensorOk else output1dShapeOk",
|
| 97 |
-
"zeroPointsOmitted": "not present.x_zero_point and not present.w_zero_point"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 98 |
},
|
| 99 |
"when": ["outputBatchChannelsOk"],
|
| 100 |
"bindings": {
|
| 101 |
-
"x": { "
|
| 102 |
-
"x_zero_point": { "
|
| 103 |
-
"cols": { "scratch": "cols3d", "
|
| 104 |
"params": {
|
| 105 |
-
"buffer": "uniform",
|
| 106 |
"struct": [
|
| 107 |
{ "name": "outCount", "type": "u32", "value": "dim(shapes.y, 2) * dim(shapes.y, 3) * dim(shapes.y, 4)" },
|
| 108 |
{ "name": "inChannels", "type": "u32", "value": "dim(shapes.x, 1)" },
|
|
@@ -118,10 +132,9 @@
|
|
| 118 |
{ "name": "outW", "type": "u32", "value": "dim(shapes.y, 4)" }
|
| 119 |
]
|
| 120 |
},
|
| 121 |
-
"
|
| 122 |
-
"
|
| 123 |
"name": "params",
|
| 124 |
-
"buffer": "uniform",
|
| 125 |
"struct": [
|
| 126 |
{ "name": "outCount", "type": "u32", "value": "dim(shapes.y, 2) * dim(shapes.y, 3)" },
|
| 127 |
{ "name": "inChannels", "type": "u32", "value": "dim(shapes.x, 1)" },
|
|
@@ -131,14 +144,13 @@
|
|
| 131 |
{ "name": "outW", "type": "u32", "value": "dim(shapes.y, 3)" }
|
| 132 |
]
|
| 133 |
},
|
| 134 |
-
"a": { "arg": "w", "
|
| 135 |
"b": { "scratch": "cols3d", "buffer": "read-only-storage", "elementType": "$bScalar" },
|
| 136 |
-
"a_zero_point": { "arg": "w_zero_point", "
|
| 137 |
-
"b_zero_point": { "arg": "x_zero_point", "
|
| 138 |
-
"y": { "
|
| 139 |
-
"
|
| 140 |
"name": "params",
|
| 141 |
-
"buffer": "uniform",
|
| 142 |
"struct": [
|
| 143 |
{ "name": "M", "type": "u32", "value": "dim(shapes.w, 0)" },
|
| 144 |
{ "name": "N", "type": "u32", "value": "dim(shapes.y, 2) * dim(shapes.y, 3) * dim(shapes.y, 4)" },
|
|
@@ -160,10 +172,9 @@
|
|
| 160 |
}
|
| 161 |
]
|
| 162 |
},
|
| 163 |
-
"
|
| 164 |
-
"
|
| 165 |
"name": "params",
|
| 166 |
-
"buffer": "uniform",
|
| 167 |
"struct": [
|
| 168 |
{ "name": "M", "type": "u32", "value": "dim(shapes.w, 0)" },
|
| 169 |
{ "name": "N", "type": "u32", "value": "dim(shapes.y, 2) * dim(shapes.y, 3)" },
|
|
@@ -177,27 +188,25 @@
|
|
| 177 |
{ "name": "yBatchStride", "type": "u32", "value": "dim(shapes.w, 0) * dim(shapes.y, 2) * dim(shapes.y, 3)" }
|
| 178 |
]
|
| 179 |
},
|
| 180 |
-
"
|
| 181 |
-
"
|
| 182 |
-
"
|
| 183 |
"name": "params",
|
| 184 |
-
"buffer": "uniform",
|
| 185 |
"struct": [
|
| 186 |
{ "name": "M", "type": "u32", "value": "dim(shapes.w, 0)" },
|
| 187 |
-
{ "name": "N", "type": "u32", "value": "
|
| 188 |
{ "name": "K", "type": "u32", "value": "dim(shapes.x, 1)" },
|
| 189 |
{ "name": "aBatchStride4", "type": "u32", "value": 0 },
|
| 190 |
-
{ "name": "bBatchStride", "type": "u32", "value": "dim(shapes.x, 1) *
|
| 191 |
-
{ "name": "yBatchStride", "type": "u32", "value": "dim(shapes.w, 0) *
|
| 192 |
]
|
| 193 |
},
|
| 194 |
-
"
|
| 195 |
-
"w": { "
|
| 196 |
-
"
|
| 197 |
-
"w_zero_point": { "
|
| 198 |
-
"
|
| 199 |
"name": "params",
|
| 200 |
-
"buffer": "uniform",
|
| 201 |
"struct": [
|
| 202 |
{ "name": "inChannels", "type": "u32", "value": "dim(shapes.x, 1)" },
|
| 203 |
{ "name": "inH", "type": "u32", "value": "inputHeight" },
|
|
@@ -219,10 +228,9 @@
|
|
| 219 |
{ "name": "count", "type": "u32", "value": "numel(shapes.y)" }
|
| 220 |
]
|
| 221 |
},
|
| 222 |
-
"
|
| 223 |
-
"
|
| 224 |
"name": "params",
|
| 225 |
-
"buffer": "uniform",
|
| 226 |
"struct": [
|
| 227 |
{ "name": "inChannels", "type": "u32", "value": "dim(shapes.x, 1)" },
|
| 228 |
{ "name": "inD", "type": "u32", "value": "dim(shapes.x, 2)" },
|
|
@@ -249,7 +257,8 @@
|
|
| 249 |
{ "name": "padW", "type": "i32", "value": "effectivePadLeft" },
|
| 250 |
{ "name": "count", "type": "u32", "value": "numel(shapes.y)" }
|
| 251 |
]
|
| 252 |
-
}
|
|
|
|
| 253 |
},
|
| 254 |
"variants": [
|
| 255 |
{
|
|
@@ -257,18 +266,10 @@
|
|
| 257 |
"priority": 20,
|
| 258 |
"when": ["packedFeature", "rank5TensorOk", "scalarXZeroRequiredOk", "scalarWZeroRequiredOk", "ungroupedChannelsOk", "dim(shapes.w, 1) * dim(shapes.w, 2) * dim(shapes.w, 3) * dim(shapes.w, 4) % 4 == 0", "dim(shapes.w, 1) * dim(shapes.w, 2) * dim(shapes.w, 3) * dim(shapes.w, 4) >= 32", "dim(shapes.w, 0) >= 8", "dim(shapes.y, 2) * dim(shapes.y, 3) * dim(shapes.y, 4) >= 256", "output3dShapeOk", "dim(shapes.x, 0) * dim(shapes.w, 1) * dim(shapes.w, 2) * dim(shapes.w, 3) * dim(shapes.w, 4) * dim(shapes.y, 2) * dim(shapes.y, 3) * dim(shapes.y, 4) * 4 <= device.limits.maxStorageBufferBindingSize", "dim(shapes.w, 1) * dim(shapes.w, 2) * dim(shapes.w, 3) * dim(shapes.w, 4) <= min(device.limits.maxComputeWorkgroupsPerDimension, 65535)", "ceilDiv(dim(shapes.y, 2) * dim(shapes.y, 3) * dim(shapes.y, 4), tunables.WORKGROUP_SIZE) <= min(device.limits.maxComputeWorkgroupsPerDimension, 65535)", "ceilDiv(dim(shapes.y, 2) * dim(shapes.y, 3) * dim(shapes.y, 4), 64) <= min(device.limits.maxComputeWorkgroupsPerDimension, 65535)", "ceilDiv(dim(shapes.w, 0), 8) <= min(device.limits.maxComputeWorkgroupsPerDimension, 65535)", "dim(shapes.x, 0) <= min(device.limits.maxComputeWorkgroupsPerDimension, 65535)"],
|
| 259 |
"derive": {
|
| 260 |
-
"aScalar": "\"u32\" if tensorDtypes.w == \"uint8\" else \"i32\"",
|
| 261 |
-
"bScalar": "\"u32\" if tensorDtypes.x == \"uint8\" else \"i32\"",
|
| 262 |
-
"aVec4": "\"vec4<u32>\" if tensorDtypes.w == \"uint8\" else \"vec4<i32>\"",
|
| 263 |
-
"aUnsigned": "tensorDtypes.w == \"uint8\"",
|
| 264 |
-
"bUnsigned": "tensorDtypes.x == \"uint8\"",
|
| 265 |
"hasAZero": true,
|
| 266 |
"hasBZero": true,
|
| 267 |
"aPacked": true,
|
| 268 |
"aZeroPerRow": false,
|
| 269 |
-
"bZeroPerColumn": false,
|
| 270 |
-
"requant": "\"none\"",
|
| 271 |
-
"scaleScalar": "\"f32\"",
|
| 272 |
"tileM": 8,
|
| 273 |
"tileN": 64,
|
| 274 |
"ktWords": 32,
|
|
@@ -312,7 +313,7 @@
|
|
| 312 |
"id": "main",
|
| 313 |
"name": "ConvInteger.Im2Col3dDp4a",
|
| 314 |
"shader": "quant-dp4a-matmul.wgsl.jinja",
|
| 315 |
-
"bindings": ["a", "b", "a_zero_point", "b_zero_point", "y", "
|
| 316 |
"dispatch": {
|
| 317 |
"x": "ceil(dim(shapes.y, 2) * dim(shapes.y, 3) * dim(shapes.y, 4) / 64)",
|
| 318 |
"y": "ceil(dim(shapes.w, 0) / 8)",
|
|
@@ -325,21 +326,7 @@
|
|
| 325 |
"id": "dp4a_im2col_nchw_scalar_zero_points",
|
| 326 |
"priority": 20,
|
| 327 |
"when": ["packedFeature", "rank4TensorOk", "scalarXZeroRequiredOk", "scalarWZeroRequiredOk", "ungroupedChannelsOk", "(dim(shapes.w, 2) > 1 or dim(shapes.w, 3) > 1)", "dim(shapes.w, 1) * dim(shapes.w, 2) * dim(shapes.w, 3) % 4 == 0", "dim(shapes.w, 1) * dim(shapes.w, 2) * dim(shapes.w, 3) >= 64", "numel(shapes.y) >= 8192", "dim(shapes.y, 2) * dim(shapes.y, 3) <= 4194240", "dim(shapes.w, 0) <= 524280", "dim(shapes.y, 0) <= min(device.limits.maxComputeWorkgroupsPerDimension, 65535)"],
|
| 328 |
-
"derive": {
|
| 329 |
-
"aScalar": "\"u32\" if tensorDtypes.w == \"uint8\" else \"i32\"",
|
| 330 |
-
"bScalar": "\"u32\" if tensorDtypes.x == \"uint8\" else \"i32\"",
|
| 331 |
-
"aVec4": "\"vec4<u32>\" if tensorDtypes.w == \"uint8\" else \"vec4<i32>\"",
|
| 332 |
-
"aUnsigned": "tensorDtypes.w == \"uint8\"",
|
| 333 |
-
"bUnsigned": "tensorDtypes.x == \"uint8\"",
|
| 334 |
-
"hasAZero": true,
|
| 335 |
-
"hasBZero": true,
|
| 336 |
-
"bZeroPerColumn": false,
|
| 337 |
-
"requant": "\"none\"",
|
| 338 |
-
"scaleScalar": "\"f32\"",
|
| 339 |
-
"tileM": 8,
|
| 340 |
-
"tileN": 64,
|
| 341 |
-
"ktWords": 32
|
| 342 |
-
},
|
| 343 |
"intermediates": [
|
| 344 |
{
|
| 345 |
"id": "cols",
|
|
@@ -363,7 +350,7 @@
|
|
| 363 |
"padTopSpec": "effectivePadTop",
|
| 364 |
"padLeftSpec": "effectivePadLeft"
|
| 365 |
},
|
| 366 |
-
"bindings": ["x", "x_zero_point", "
|
| 367 |
"dispatch": {
|
| 368 |
"x": "ceil(dim(shapes.y, 2) * dim(shapes.y, 3) / tunables.WORKGROUP_SIZE)",
|
| 369 |
"y": "dim(shapes.w, 1) * dim(shapes.w, 2) * dim(shapes.w, 3)",
|
|
@@ -374,7 +361,7 @@
|
|
| 374 |
"id": "main",
|
| 375 |
"name": "ConvInteger.Im2ColDp4a",
|
| 376 |
"shader": "quant-dp4a-matmul.wgsl.jinja",
|
| 377 |
-
"bindings": ["a", "
|
| 378 |
"dispatch": {
|
| 379 |
"x": "ceil(dim(shapes.y, 2) * dim(shapes.y, 3) / 64)",
|
| 380 |
"y": "ceil(dim(shapes.w, 0) / 8)",
|
|
@@ -386,31 +373,102 @@
|
|
| 386 |
{
|
| 387 |
"id": "dp4a_pointwise_1x1_tail",
|
| 388 |
"priority": 21,
|
| 389 |
-
"when": ["
|
| 390 |
"derive": {
|
| 391 |
-
"aScalar": "\"u32\" if tensorDtypes.w == \"uint8\" else \"i32\"",
|
| 392 |
-
"bScalar": "\"u32\" if tensorDtypes.x == \"uint8\" else \"i32\"",
|
| 393 |
-
"aPacked": false,
|
| 394 |
-
"aUnsigned": "tensorDtypes.w == \"uint8\"",
|
| 395 |
-
"bUnsigned": "tensorDtypes.x == \"uint8\"",
|
| 396 |
"hasAZero": true,
|
| 397 |
"hasBZero": true,
|
| 398 |
-
"
|
| 399 |
-
"
|
| 400 |
-
"
|
| 401 |
-
"
|
| 402 |
-
"tileN": 64,
|
| 403 |
-
"ktWords": 32
|
| 404 |
},
|
| 405 |
"passes": [
|
| 406 |
{
|
| 407 |
"id": "main",
|
| 408 |
"name": "ConvInteger.Dp4aPointwiseTail",
|
| 409 |
"shader": "quant-dp4a-matmul.wgsl.jinja",
|
| 410 |
-
"bindings": ["
|
| 411 |
"dispatch": {
|
| 412 |
-
"x": "
|
| 413 |
-
"y": "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 414 |
"z": "dim(shapes.y, 0)"
|
| 415 |
}
|
| 416 |
}
|
|
@@ -419,31 +477,210 @@
|
|
| 419 |
{
|
| 420 |
"id": "dp4a_pointwise_1x1",
|
| 421 |
"priority": 20,
|
| 422 |
-
"when": ["
|
| 423 |
"derive": {
|
| 424 |
-
"aScalar": "\"u32\" if tensorDtypes.w == \"uint8\" else \"i32\"",
|
| 425 |
-
"bScalar": "\"u32\" if tensorDtypes.x == \"uint8\" else \"i32\"",
|
| 426 |
"aVec4": "\"vec4<u32>\" if tensorDtypes.w == \"uint8\" else \"vec4<i32>\"",
|
| 427 |
-
"aUnsigned": "tensorDtypes.w == \"uint8\"",
|
| 428 |
-
"bUnsigned": "tensorDtypes.x == \"uint8\"",
|
| 429 |
"hasAZero": true,
|
| 430 |
"hasBZero": true,
|
| 431 |
-
"
|
| 432 |
-
"
|
| 433 |
-
"
|
| 434 |
-
"tileM": 8,
|
| 435 |
-
"tileN": 64,
|
| 436 |
-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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 447 |
"z": "dim(shapes.y, 0)"
|
| 448 |
}
|
| 449 |
}
|
|
@@ -453,20 +690,14 @@
|
|
| 453 |
"id": "nchw2d_per_channel_zero_point",
|
| 454 |
"priority": 5,
|
| 455 |
"when": ["nchwTensorOk", "scalarXZeroRequiredOk", "ranks.w_zero_point == 1", "dim(shapes.w_zero_point, 0) == dim(shapes.w, 0)", "groupChannelsOk", "outputSpatialShapeOk"],
|
| 456 |
-
"derive": {
|
| 457 |
-
"xScalar": "\"u32\" if tensorDtypes.x == \"uint8\" else \"i32\"",
|
| 458 |
-
"wScalar": "\"u32\" if tensorDtypes.w == \"uint8\" else \"i32\"",
|
| 459 |
-
"xUnsigned": "tensorDtypes.x == \"uint8\"",
|
| 460 |
-
"wUnsigned": "tensorDtypes.w == \"uint8\"",
|
| 461 |
-
"wZeroPerChannel": true
|
| 462 |
-
},
|
| 463 |
"passes": [
|
| 464 |
{
|
| 465 |
"id": "main",
|
| 466 |
"name": "ConvIntegerPerChannel",
|
| 467 |
"shader": "conv-int-accumulate-spatial.wgsl.jinja",
|
| 468 |
"derive": { "spatialRankSpec": 2, "xZeroOmitted": "false", "wZeroOmitted": "false" },
|
| 469 |
-
"bindings": ["
|
| 470 |
"dispatch": {
|
| 471 |
"x": "min(ceilDiv((numel(shapes.y)), (tunables.WORKGROUP_SIZE)), 65535)",
|
| 472 |
"y": "ceilDiv(ceilDiv((numel(shapes.y)), (tunables.WORKGROUP_SIZE)), 65535)",
|
|
@@ -479,20 +710,14 @@
|
|
| 479 |
"id": "nchw2d_per_channel_w_zero_point_only",
|
| 480 |
"priority": 5,
|
| 481 |
"when": ["nchwTensorOk", "not present.x_zero_point", "present.w_zero_point", "ranks.w_zero_point == 1", "dim(shapes.w_zero_point, 0) == dim(shapes.w, 0)", "groupChannelsOk", "outputSpatialShapeOk"],
|
| 482 |
-
"derive": {
|
| 483 |
-
"xScalar": "\"u32\" if tensorDtypes.x == \"uint8\" else \"i32\"",
|
| 484 |
-
"wScalar": "\"u32\" if tensorDtypes.w == \"uint8\" else \"i32\"",
|
| 485 |
-
"xUnsigned": "tensorDtypes.x == \"uint8\"",
|
| 486 |
-
"wUnsigned": "tensorDtypes.w == \"uint8\"",
|
| 487 |
-
"wZeroPerChannel": true
|
| 488 |
-
},
|
| 489 |
"passes": [
|
| 490 |
{
|
| 491 |
"id": "main",
|
| 492 |
"name": "ConvIntegerPerChannel",
|
| 493 |
"shader": "conv-int-accumulate-spatial.wgsl.jinja",
|
| 494 |
"derive": { "spatialRankSpec": 2, "xZeroOmitted": "true", "wZeroOmitted": "false" },
|
| 495 |
-
"bindings": ["
|
| 496 |
"dispatch": {
|
| 497 |
"x": "min(ceilDiv((numel(shapes.y)), (tunables.WORKGROUP_SIZE)), 65535)",
|
| 498 |
"y": "ceilDiv(ceilDiv((numel(shapes.y)), (tunables.WORKGROUP_SIZE)), 65535)",
|
|
@@ -504,19 +729,14 @@
|
|
| 504 |
{
|
| 505 |
"id": "nchw2d_scalar_zero_points",
|
| 506 |
"when": ["nchwTensorOk", "scalarXZeroRequiredOk", "scalarWZeroRequiredOk", "groupChannelsOk", "outputSpatialShapeOk"],
|
| 507 |
-
"derive": {
|
| 508 |
-
"xScalar": "\"u32\" if tensorDtypes.x == \"uint8\" else \"i32\"",
|
| 509 |
-
"wScalar": "\"u32\" if tensorDtypes.w == \"uint8\" else \"i32\"",
|
| 510 |
-
"xUnsigned": "tensorDtypes.x == \"uint8\"",
|
| 511 |
-
"wUnsigned": "tensorDtypes.w == \"uint8\""
|
| 512 |
-
},
|
| 513 |
"passes": [
|
| 514 |
{
|
| 515 |
"id": "main",
|
| 516 |
"name": "ConvInteger",
|
| 517 |
"shader": "conv-int-accumulate-spatial.wgsl.jinja",
|
| 518 |
"derive": { "spatialRankSpec": 2, "xZeroOmitted": "false", "wZeroOmitted": "false" },
|
| 519 |
-
"bindings": ["
|
| 520 |
"dispatch": {
|
| 521 |
"x": "min(ceilDiv((numel(shapes.y)), (tunables.WORKGROUP_SIZE)), 65535)",
|
| 522 |
"y": "ceilDiv(ceilDiv((numel(shapes.y)), (tunables.WORKGROUP_SIZE)), 65535)",
|
|
@@ -528,19 +748,14 @@
|
|
| 528 |
{
|
| 529 |
"id": "nchw2d_x_zero_point_only",
|
| 530 |
"when": ["nchwTensorOk", "present.x_zero_point", "not present.w_zero_point", "scalarXZeroRequiredOk", "groupChannelsOk", "outputSpatialShapeOk"],
|
| 531 |
-
"derive": {
|
| 532 |
-
"xScalar": "\"u32\" if tensorDtypes.x == \"uint8\" else \"i32\"",
|
| 533 |
-
"wScalar": "\"u32\" if tensorDtypes.w == \"uint8\" else \"i32\"",
|
| 534 |
-
"xUnsigned": "tensorDtypes.x == \"uint8\"",
|
| 535 |
-
"wUnsigned": "tensorDtypes.w == \"uint8\""
|
| 536 |
-
},
|
| 537 |
"passes": [
|
| 538 |
{
|
| 539 |
"id": "main",
|
| 540 |
"name": "ConvInteger",
|
| 541 |
"shader": "conv-int-accumulate-spatial.wgsl.jinja",
|
| 542 |
"derive": { "spatialRankSpec": 2, "xZeroOmitted": "false", "wZeroOmitted": "true" },
|
| 543 |
-
"bindings": ["
|
| 544 |
"dispatch": {
|
| 545 |
"x": "min(ceilDiv((numel(shapes.y)), (tunables.WORKGROUP_SIZE)), 65535)",
|
| 546 |
"y": "ceilDiv(ceilDiv((numel(shapes.y)), (tunables.WORKGROUP_SIZE)), 65535)",
|
|
@@ -552,19 +767,14 @@
|
|
| 552 |
{
|
| 553 |
"id": "nchw2d_w_zero_point_only",
|
| 554 |
"when": ["nchwTensorOk", "not present.x_zero_point", "present.w_zero_point", "scalarWZeroRequiredOk", "groupChannelsOk", "outputSpatialShapeOk"],
|
| 555 |
-
"derive": {
|
| 556 |
-
"xScalar": "\"u32\" if tensorDtypes.x == \"uint8\" else \"i32\"",
|
| 557 |
-
"wScalar": "\"u32\" if tensorDtypes.w == \"uint8\" else \"i32\"",
|
| 558 |
-
"xUnsigned": "tensorDtypes.x == \"uint8\"",
|
| 559 |
-
"wUnsigned": "tensorDtypes.w == \"uint8\""
|
| 560 |
-
},
|
| 561 |
"passes": [
|
| 562 |
{
|
| 563 |
"id": "main",
|
| 564 |
"name": "ConvInteger",
|
| 565 |
"shader": "conv-int-accumulate-spatial.wgsl.jinja",
|
| 566 |
"derive": { "spatialRankSpec": 2, "xZeroOmitted": "true", "wZeroOmitted": "false" },
|
| 567 |
-
"bindings": ["
|
| 568 |
"dispatch": {
|
| 569 |
"x": "min(ceilDiv((numel(shapes.y)), (tunables.WORKGROUP_SIZE)), 65535)",
|
| 570 |
"y": "ceilDiv(ceilDiv((numel(shapes.y)), (tunables.WORKGROUP_SIZE)), 65535)",
|
|
@@ -576,19 +786,14 @@
|
|
| 576 |
{
|
| 577 |
"id": "ncdhw3d_scalar_zero_points",
|
| 578 |
"when": ["rank5TensorOk", "scalarXZeroRequiredOk", "scalarWZeroRequiredOk", "groupChannelsOk", "output3dShapeOk"],
|
| 579 |
-
"derive": {
|
| 580 |
-
"xScalar": "\"u32\" if tensorDtypes.x == \"uint8\" else \"i32\"",
|
| 581 |
-
"wScalar": "\"u32\" if tensorDtypes.w == \"uint8\" else \"i32\"",
|
| 582 |
-
"xUnsigned": "tensorDtypes.x == \"uint8\"",
|
| 583 |
-
"wUnsigned": "tensorDtypes.w == \"uint8\""
|
| 584 |
-
},
|
| 585 |
"passes": [
|
| 586 |
{
|
| 587 |
"id": "main",
|
| 588 |
"name": "ConvInteger3d",
|
| 589 |
"shader": "conv-int-accumulate-spatial.wgsl.jinja",
|
| 590 |
"derive": { "spatialRankSpec": 3, "xZeroOmitted": "false", "wZeroOmitted": "false" },
|
| 591 |
-
"bindings": ["
|
| 592 |
"dispatch": {
|
| 593 |
"x": "min(ceilDiv((numel(shapes.y)), (tunables.WORKGROUP_SIZE)), 65535)",
|
| 594 |
"y": "ceilDiv(ceilDiv((numel(shapes.y)), (tunables.WORKGROUP_SIZE)), 65535)",
|
|
@@ -600,19 +805,14 @@
|
|
| 600 |
{
|
| 601 |
"id": "ncdhw3d_x_zero_point_only",
|
| 602 |
"when": ["rank5TensorOk", "scalarXZeroRequiredOk", "not present.w_zero_point", "groupChannelsOk", "output3dShapeOk"],
|
| 603 |
-
"derive": {
|
| 604 |
-
"xScalar": "\"u32\" if tensorDtypes.x == \"uint8\" else \"i32\"",
|
| 605 |
-
"wScalar": "\"u32\" if tensorDtypes.w == \"uint8\" else \"i32\"",
|
| 606 |
-
"xUnsigned": "tensorDtypes.x == \"uint8\"",
|
| 607 |
-
"wUnsigned": "tensorDtypes.w == \"uint8\""
|
| 608 |
-
},
|
| 609 |
"passes": [
|
| 610 |
{
|
| 611 |
"id": "main",
|
| 612 |
"name": "ConvInteger3d",
|
| 613 |
"shader": "conv-int-accumulate-spatial.wgsl.jinja",
|
| 614 |
"derive": { "spatialRankSpec": 3, "xZeroOmitted": "false", "wZeroOmitted": "true" },
|
| 615 |
-
"bindings": ["
|
| 616 |
"dispatch": {
|
| 617 |
"x": "min(ceilDiv((numel(shapes.y)), (tunables.WORKGROUP_SIZE)), 65535)",
|
| 618 |
"y": "ceilDiv(ceilDiv((numel(shapes.y)), (tunables.WORKGROUP_SIZE)), 65535)",
|
|
@@ -624,19 +824,14 @@
|
|
| 624 |
{
|
| 625 |
"id": "ncdhw3d_w_zero_point_only",
|
| 626 |
"when": ["rank5TensorOk", "not present.x_zero_point", "scalarWZeroRequiredOk", "groupChannelsOk", "output3dShapeOk"],
|
| 627 |
-
"derive": {
|
| 628 |
-
"xScalar": "\"u32\" if tensorDtypes.x == \"uint8\" else \"i32\"",
|
| 629 |
-
"wScalar": "\"u32\" if tensorDtypes.w == \"uint8\" else \"i32\"",
|
| 630 |
-
"xUnsigned": "tensorDtypes.x == \"uint8\"",
|
| 631 |
-
"wUnsigned": "tensorDtypes.w == \"uint8\""
|
| 632 |
-
},
|
| 633 |
"passes": [
|
| 634 |
{
|
| 635 |
"id": "main",
|
| 636 |
"name": "ConvInteger3d",
|
| 637 |
"shader": "conv-int-accumulate-spatial.wgsl.jinja",
|
| 638 |
"derive": { "spatialRankSpec": 3, "xZeroOmitted": "true", "wZeroOmitted": "false" },
|
| 639 |
-
"bindings": ["
|
| 640 |
"dispatch": {
|
| 641 |
"x": "min(ceilDiv((numel(shapes.y)), (tunables.WORKGROUP_SIZE)), 65535)",
|
| 642 |
"y": "ceilDiv(ceilDiv((numel(shapes.y)), (tunables.WORKGROUP_SIZE)), 65535)",
|
|
@@ -648,19 +843,14 @@
|
|
| 648 |
{
|
| 649 |
"id": "ncdhw3d_implicit_zero_points",
|
| 650 |
"when": ["rank5TensorOk", "zeroPointsOmitted", "groupChannelsOk", "output3dShapeOk"],
|
| 651 |
-
"derive": {
|
| 652 |
-
"xScalar": "\"u32\" if tensorDtypes.x == \"uint8\" else \"i32\"",
|
| 653 |
-
"wScalar": "\"u32\" if tensorDtypes.w == \"uint8\" else \"i32\"",
|
| 654 |
-
"xUnsigned": "tensorDtypes.x == \"uint8\"",
|
| 655 |
-
"wUnsigned": "tensorDtypes.w == \"uint8\""
|
| 656 |
-
},
|
| 657 |
"passes": [
|
| 658 |
{
|
| 659 |
"id": "main",
|
| 660 |
"name": "ConvInteger3d",
|
| 661 |
"shader": "conv-int-accumulate-spatial.wgsl.jinja",
|
| 662 |
"derive": { "spatialRankSpec": 3, "xZeroOmitted": "true", "wZeroOmitted": "true" },
|
| 663 |
-
"bindings": ["
|
| 664 |
"dispatch": {
|
| 665 |
"x": "min(ceilDiv((numel(shapes.y)), (tunables.WORKGROUP_SIZE)), 65535)",
|
| 666 |
"y": "ceilDiv(ceilDiv((numel(shapes.y)), (tunables.WORKGROUP_SIZE)), 65535)",
|
|
@@ -672,19 +862,14 @@
|
|
| 672 |
{
|
| 673 |
"id": "nchw_implicit_zero_points",
|
| 674 |
"when": ["nchwTensorOk", "zeroPointsOmitted", "groupChannelsOk", "outputSpatialShapeOk"],
|
| 675 |
-
"derive": {
|
| 676 |
-
"xScalar": "\"u32\" if tensorDtypes.x == \"uint8\" else \"i32\"",
|
| 677 |
-
"wScalar": "\"u32\" if tensorDtypes.w == \"uint8\" else \"i32\"",
|
| 678 |
-
"xUnsigned": "tensorDtypes.x == \"uint8\"",
|
| 679 |
-
"wUnsigned": "tensorDtypes.w == \"uint8\""
|
| 680 |
-
},
|
| 681 |
"passes": [
|
| 682 |
{
|
| 683 |
"id": "main",
|
| 684 |
"name": "ConvInteger",
|
| 685 |
"shader": "conv-int-accumulate-spatial.wgsl.jinja",
|
| 686 |
"derive": { "spatialRankSpec": 2, "xZeroOmitted": "true", "wZeroOmitted": "true" },
|
| 687 |
-
"bindings": ["
|
| 688 |
"dispatch": {
|
| 689 |
"x": "min(ceilDiv((numel(shapes.y)), (tunables.WORKGROUP_SIZE)), 65535)",
|
| 690 |
"y": "ceilDiv(ceilDiv((numel(shapes.y)), (tunables.WORKGROUP_SIZE)), 65535)",
|
|
|
|
| 80 |
"spatialAttributesOk": "spatialRank >= 1 and spatialRank <= 3 and spatialAttributeLengthsOk and kernelShapeMatchesWeights and kernelExtentsOk and stridesValuesOk and dilationsValuesOk and padsValuesOk and explicitPadsOk",
|
| 81 |
"packedFeature": "device.wgslLanguageFeatures.has(\"packed_4x8_integer_dot_product\")",
|
| 82 |
"rank4TensorOk": "spatialAttributesOk and (ranks.x == 4 and ranks.w == 4 and ranks.y == 4)",
|
| 83 |
+
"outputBatchChannelsOk": "dim(shapes.y, 0) == dim(shapes.x, 0) and dim(shapes.y, 1) == dim(shapes.w, 0)",
|
| 84 |
+
"groupChannelsOk": "attrs.group >= 1 and dim(shapes.w, 1) * attrs.group == dim(shapes.x, 1) and dim(shapes.w, 0) % attrs.group == 0",
|
| 85 |
+
"output2dShapeOk": "dim(shapes.y, 2) == expectedOutputHeight and dim(shapes.y, 3) == expectedOutputWidth",
|
| 86 |
+
"aScalar": "\"u32\" if tensorDtypes.w == \"uint8\" else \"i32\"",
|
| 87 |
+
"bScalar": "\"u32\" if tensorDtypes.x == \"uint8\" else \"i32\"",
|
| 88 |
+
"wScalar": "\"u32\" if tensorDtypes.w == \"uint8\" else \"i32\"",
|
| 89 |
+
"xScalar": "\"u32\" if tensorDtypes.x == \"uint8\" else \"i32\"",
|
| 90 |
+
"aUnsigned": "tensorDtypes.w == \"uint8\"",
|
| 91 |
+
"bUnsigned": "tensorDtypes.x == \"uint8\"",
|
| 92 |
+
"wUnsigned": "tensorDtypes.w == \"uint8\"",
|
| 93 |
+
"xUnsigned": "tensorDtypes.x == \"uint8\"",
|
| 94 |
+
"bZeroPerColumn": false,
|
| 95 |
"rank5TensorOk": "spatialAttributesOk and (ranks.x == 5 and ranks.w == 5 and ranks.y == 5)",
|
| 96 |
"scalarXZeroOk": "ranks.x_zero_point == 0 or (ranks.x_zero_point == 1 and dim(shapes.x_zero_point, 0) == 1)",
|
| 97 |
"scalarWZeroOk": "ranks.w_zero_point == 0 or (ranks.w_zero_point == 1 and dim(shapes.w_zero_point, 0) == 1)",
|
| 98 |
"scalarXZeroRequiredOk": "present.x_zero_point and scalarXZeroOk",
|
| 99 |
"scalarWZeroRequiredOk": "present.w_zero_point and scalarWZeroOk",
|
|
|
|
| 100 |
"ungroupedChannelsOk": "attrs.group == 1 and dim(shapes.w, 1) == dim(shapes.x, 1)",
|
|
|
|
|
|
|
| 101 |
"output3dShapeOk": "dim(shapes.y, 2) == expectedOutputDepth and dim(shapes.y, 3) == expectedOutputHeight and dim(shapes.y, 4) == expectedOutputWidth",
|
| 102 |
"rank3TensorOk": "spatialAttributesOk and (ranks.x == 3 and ranks.w == 3 and ranks.y == 3)",
|
| 103 |
"nchwTensorOk": "rank4TensorOk or rank3TensorOk",
|
| 104 |
"output1dShapeOk": "dim(shapes.y, 2) == expectedOutputWidth",
|
| 105 |
"outputSpatialShapeOk": "output2dShapeOk if rank4TensorOk else output1dShapeOk",
|
| 106 |
+
"zeroPointsOmitted": "not present.x_zero_point and not present.w_zero_point",
|
| 107 |
+
"pointwiseTileM": 8,
|
| 108 |
+
"pointwiseTileN": 64,
|
| 109 |
+
"pointwiseKtWords": 32,
|
| 110 |
+
"pointwiseResourcesOk": "pointwiseTileN <= min(device.limits.maxComputeWorkgroupSizeX, device.limits.maxComputeInvocationsPerWorkgroup) and 4 * pointwiseTileM * (pointwiseKtWords + 1) <= device.limits.maxComputeWorkgroupStorageSize",
|
| 111 |
+
"pointwiseDispatchOk": "ceilDiv(outputHeight * outputWidth, pointwiseTileN) <= min(device.limits.maxComputeWorkgroupsPerDimension, 65535) and ceilDiv(dim(shapes.w, 0), pointwiseTileM) <= min(device.limits.maxComputeWorkgroupsPerDimension, 65535) and dim(shapes.y, 0) <= min(device.limits.maxComputeWorkgroupsPerDimension, 65535)",
|
| 112 |
+
"aVec4": "\"vec4<u32>\" if tensorDtypes.w == \"uint8\" else \"vec4<i32>\""
|
| 113 |
},
|
| 114 |
"when": ["outputBatchChannelsOk"],
|
| 115 |
"bindings": {
|
| 116 |
+
"x": { "elementType": "$bScalar" },
|
| 117 |
+
"x_zero_point": { "elementType": "$bScalar", "length": 1 },
|
| 118 |
+
"cols": { "scratch": "cols3d", "elementType": "$bScalar" },
|
| 119 |
"params": {
|
|
|
|
| 120 |
"struct": [
|
| 121 |
{ "name": "outCount", "type": "u32", "value": "dim(shapes.y, 2) * dim(shapes.y, 3) * dim(shapes.y, 4)" },
|
| 122 |
{ "name": "inChannels", "type": "u32", "value": "dim(shapes.x, 1)" },
|
|
|
|
| 132 |
{ "name": "outW", "type": "u32", "value": "dim(shapes.y, 4)" }
|
| 133 |
]
|
| 134 |
},
|
| 135 |
+
"cols_im2col": { "name": "cols", "buffer": "storage", "elementType": "$bScalar" },
|
| 136 |
+
"params_im2col": {
|
| 137 |
"name": "params",
|
|
|
|
| 138 |
"struct": [
|
| 139 |
{ "name": "outCount", "type": "u32", "value": "dim(shapes.y, 2) * dim(shapes.y, 3)" },
|
| 140 |
{ "name": "inChannels", "type": "u32", "value": "dim(shapes.x, 1)" },
|
|
|
|
| 144 |
{ "name": "outW", "type": "u32", "value": "dim(shapes.y, 3)" }
|
| 145 |
]
|
| 146 |
},
|
| 147 |
+
"a": { "arg": "w", "elementType": "$aVec4" },
|
| 148 |
"b": { "scratch": "cols3d", "buffer": "read-only-storage", "elementType": "$bScalar" },
|
| 149 |
+
"a_zero_point": { "arg": "w_zero_point", "elementType": "$aScalar", "length": 1 },
|
| 150 |
+
"b_zero_point": { "arg": "x_zero_point", "elementType": "$bScalar", "length": 1 },
|
| 151 |
+
"y": { "elementType": "i32" },
|
| 152 |
+
"params_main": {
|
| 153 |
"name": "params",
|
|
|
|
| 154 |
"struct": [
|
| 155 |
{ "name": "M", "type": "u32", "value": "dim(shapes.w, 0)" },
|
| 156 |
{ "name": "N", "type": "u32", "value": "dim(shapes.y, 2) * dim(shapes.y, 3) * dim(shapes.y, 4)" },
|
|
|
|
| 172 |
}
|
| 173 |
]
|
| 174 |
},
|
| 175 |
+
"b_main": { "scratch": "cols", "name": "b", "buffer": "read-only-storage", "elementType": "$bScalar" },
|
| 176 |
+
"params__uniform": {
|
| 177 |
"name": "params",
|
|
|
|
| 178 |
"struct": [
|
| 179 |
{ "name": "M", "type": "u32", "value": "dim(shapes.w, 0)" },
|
| 180 |
{ "name": "N", "type": "u32", "value": "dim(shapes.y, 2) * dim(shapes.y, 3)" },
|
|
|
|
| 188 |
{ "name": "yBatchStride", "type": "u32", "value": "dim(shapes.w, 0) * dim(shapes.y, 2) * dim(shapes.y, 3)" }
|
| 189 |
]
|
| 190 |
},
|
| 191 |
+
"a_w": { "arg": "w", "name": "a", "elementType": "$aScalar" },
|
| 192 |
+
"b_x": { "arg": "x", "name": "b", "elementType": "$bScalar" },
|
| 193 |
+
"params_quant_dp4a_matmul": {
|
| 194 |
"name": "params",
|
|
|
|
| 195 |
"struct": [
|
| 196 |
{ "name": "M", "type": "u32", "value": "dim(shapes.w, 0)" },
|
| 197 |
+
{ "name": "N", "type": "u32", "value": "outputHeight * outputWidth" },
|
| 198 |
{ "name": "K", "type": "u32", "value": "dim(shapes.x, 1)" },
|
| 199 |
{ "name": "aBatchStride4", "type": "u32", "value": 0 },
|
| 200 |
+
{ "name": "bBatchStride", "type": "u32", "value": "dim(shapes.x, 1) * inputHeight * inputWidth" },
|
| 201 |
+
{ "name": "yBatchStride", "type": "u32", "value": "dim(shapes.w, 0) * outputHeight * outputWidth" }
|
| 202 |
]
|
| 203 |
},
|
| 204 |
+
"x_main": { "name": "x", "elementType": "$xScalar" },
|
| 205 |
+
"w": { "elementType": "$wScalar" },
|
| 206 |
+
"x_zero_point_main": { "name": "x_zero_point", "elementType": "$xScalar", "length": 1 },
|
| 207 |
+
"w_zero_point": { "elementType": "$wScalar" },
|
| 208 |
+
"params_nchw2d_x_zero_point_only": {
|
| 209 |
"name": "params",
|
|
|
|
| 210 |
"struct": [
|
| 211 |
{ "name": "inChannels", "type": "u32", "value": "dim(shapes.x, 1)" },
|
| 212 |
{ "name": "inH", "type": "u32", "value": "inputHeight" },
|
|
|
|
| 228 |
{ "name": "count", "type": "u32", "value": "numel(shapes.y)" }
|
| 229 |
]
|
| 230 |
},
|
| 231 |
+
"w_zero_point_main": { "name": "w_zero_point", "elementType": "$wScalar", "length": 1 },
|
| 232 |
+
"params_ncdhw3d_x_zero_point_only": {
|
| 233 |
"name": "params",
|
|
|
|
| 234 |
"struct": [
|
| 235 |
{ "name": "inChannels", "type": "u32", "value": "dim(shapes.x, 1)" },
|
| 236 |
{ "name": "inD", "type": "u32", "value": "dim(shapes.x, 2)" },
|
|
|
|
| 257 |
{ "name": "padW", "type": "i32", "value": "effectivePadLeft" },
|
| 258 |
{ "name": "count", "type": "u32", "value": "numel(shapes.y)" }
|
| 259 |
]
|
| 260 |
+
},
|
| 261 |
+
"a_zero_point_per_row": { "arg": "w_zero_point", "name": "a_zero_point", "elementType": "$aScalar" }
|
| 262 |
},
|
| 263 |
"variants": [
|
| 264 |
{
|
|
|
|
| 266 |
"priority": 20,
|
| 267 |
"when": ["packedFeature", "rank5TensorOk", "scalarXZeroRequiredOk", "scalarWZeroRequiredOk", "ungroupedChannelsOk", "dim(shapes.w, 1) * dim(shapes.w, 2) * dim(shapes.w, 3) * dim(shapes.w, 4) % 4 == 0", "dim(shapes.w, 1) * dim(shapes.w, 2) * dim(shapes.w, 3) * dim(shapes.w, 4) >= 32", "dim(shapes.w, 0) >= 8", "dim(shapes.y, 2) * dim(shapes.y, 3) * dim(shapes.y, 4) >= 256", "output3dShapeOk", "dim(shapes.x, 0) * dim(shapes.w, 1) * dim(shapes.w, 2) * dim(shapes.w, 3) * dim(shapes.w, 4) * dim(shapes.y, 2) * dim(shapes.y, 3) * dim(shapes.y, 4) * 4 <= device.limits.maxStorageBufferBindingSize", "dim(shapes.w, 1) * dim(shapes.w, 2) * dim(shapes.w, 3) * dim(shapes.w, 4) <= min(device.limits.maxComputeWorkgroupsPerDimension, 65535)", "ceilDiv(dim(shapes.y, 2) * dim(shapes.y, 3) * dim(shapes.y, 4), tunables.WORKGROUP_SIZE) <= min(device.limits.maxComputeWorkgroupsPerDimension, 65535)", "ceilDiv(dim(shapes.y, 2) * dim(shapes.y, 3) * dim(shapes.y, 4), 64) <= min(device.limits.maxComputeWorkgroupsPerDimension, 65535)", "ceilDiv(dim(shapes.w, 0), 8) <= min(device.limits.maxComputeWorkgroupsPerDimension, 65535)", "dim(shapes.x, 0) <= min(device.limits.maxComputeWorkgroupsPerDimension, 65535)"],
|
| 268 |
"derive": {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 269 |
"hasAZero": true,
|
| 270 |
"hasBZero": true,
|
| 271 |
"aPacked": true,
|
| 272 |
"aZeroPerRow": false,
|
|
|
|
|
|
|
|
|
|
| 273 |
"tileM": 8,
|
| 274 |
"tileN": 64,
|
| 275 |
"ktWords": 32,
|
|
|
|
| 313 |
"id": "main",
|
| 314 |
"name": "ConvInteger.Im2Col3dDp4a",
|
| 315 |
"shader": "quant-dp4a-matmul.wgsl.jinja",
|
| 316 |
+
"bindings": ["a", "b", "a_zero_point", "b_zero_point", "y", "params_main"],
|
| 317 |
"dispatch": {
|
| 318 |
"x": "ceil(dim(shapes.y, 2) * dim(shapes.y, 3) * dim(shapes.y, 4) / 64)",
|
| 319 |
"y": "ceil(dim(shapes.w, 0) / 8)",
|
|
|
|
| 326 |
"id": "dp4a_im2col_nchw_scalar_zero_points",
|
| 327 |
"priority": 20,
|
| 328 |
"when": ["packedFeature", "rank4TensorOk", "scalarXZeroRequiredOk", "scalarWZeroRequiredOk", "ungroupedChannelsOk", "(dim(shapes.w, 2) > 1 or dim(shapes.w, 3) > 1)", "dim(shapes.w, 1) * dim(shapes.w, 2) * dim(shapes.w, 3) % 4 == 0", "dim(shapes.w, 1) * dim(shapes.w, 2) * dim(shapes.w, 3) >= 64", "numel(shapes.y) >= 8192", "dim(shapes.y, 2) * dim(shapes.y, 3) <= 4194240", "dim(shapes.w, 0) <= 524280", "dim(shapes.y, 0) <= min(device.limits.maxComputeWorkgroupsPerDimension, 65535)"],
|
| 329 |
+
"derive": { "hasAZero": true, "hasBZero": true, "tileM": 8, "tileN": 64, "ktWords": 32 },
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 330 |
"intermediates": [
|
| 331 |
{
|
| 332 |
"id": "cols",
|
|
|
|
| 350 |
"padTopSpec": "effectivePadTop",
|
| 351 |
"padLeftSpec": "effectivePadLeft"
|
| 352 |
},
|
| 353 |
+
"bindings": ["x", "x_zero_point", "cols_im2col", "params_im2col"],
|
| 354 |
"dispatch": {
|
| 355 |
"x": "ceil(dim(shapes.y, 2) * dim(shapes.y, 3) / tunables.WORKGROUP_SIZE)",
|
| 356 |
"y": "dim(shapes.w, 1) * dim(shapes.w, 2) * dim(shapes.w, 3)",
|
|
|
|
| 361 |
"id": "main",
|
| 362 |
"name": "ConvInteger.Im2ColDp4a",
|
| 363 |
"shader": "quant-dp4a-matmul.wgsl.jinja",
|
| 364 |
+
"bindings": ["a", "b_main", "a_zero_point", "b_zero_point", "y", "params__uniform"],
|
| 365 |
"dispatch": {
|
| 366 |
"x": "ceil(dim(shapes.y, 2) * dim(shapes.y, 3) / 64)",
|
| 367 |
"y": "ceil(dim(shapes.w, 0) / 8)",
|
|
|
|
| 373 |
{
|
| 374 |
"id": "dp4a_pointwise_1x1_tail",
|
| 375 |
"priority": 21,
|
| 376 |
+
"when": ["nchwTensorOk", "ungroupedChannelsOk", "kernelHeight == 1", "kernelWidth == 1", "strideH == 1", "strideW == 1", "padTop == 0 and padBottom == 0", "padLeft == 0 and padRight == 0", "outputHeight == inputHeight", "outputWidth == inputWidth", "scalarXZeroRequiredOk", "scalarWZeroRequiredOk", "dim(shapes.x, 1) >= 32", "dim(shapes.x, 1) % 4 != 0", "pointwiseResourcesOk", "pointwiseDispatchOk"],
|
| 377 |
"derive": {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 378 |
"hasAZero": true,
|
| 379 |
"hasBZero": true,
|
| 380 |
+
"tileM": "pointwiseTileM",
|
| 381 |
+
"tileN": "pointwiseTileN",
|
| 382 |
+
"ktWords": "pointwiseKtWords",
|
| 383 |
+
"aPacked": false
|
|
|
|
|
|
|
| 384 |
},
|
| 385 |
"passes": [
|
| 386 |
{
|
| 387 |
"id": "main",
|
| 388 |
"name": "ConvInteger.Dp4aPointwiseTail",
|
| 389 |
"shader": "quant-dp4a-matmul.wgsl.jinja",
|
| 390 |
+
"bindings": ["a_w", "b_x", "a_zero_point", "b_zero_point", "y", "params_quant_dp4a_matmul"],
|
| 391 |
"dispatch": {
|
| 392 |
+
"x": "ceilDiv(outputHeight * outputWidth, pointwiseTileN)",
|
| 393 |
+
"y": "ceilDiv(dim(shapes.w, 0), pointwiseTileM)",
|
| 394 |
+
"z": "dim(shapes.y, 0)"
|
| 395 |
+
}
|
| 396 |
+
}
|
| 397 |
+
]
|
| 398 |
+
},
|
| 399 |
+
{
|
| 400 |
+
"id": "dp4a_pointwise_1x1_tail_x_zero_point_only",
|
| 401 |
+
"priority": 21,
|
| 402 |
+
"when": ["nchwTensorOk", "ungroupedChannelsOk", "kernelHeight == 1", "kernelWidth == 1", "strideH == 1", "strideW == 1", "padTop == 0 and padBottom == 0", "padLeft == 0 and padRight == 0", "outputHeight == inputHeight", "outputWidth == inputWidth", "scalarXZeroRequiredOk", "not present.w_zero_point", "dim(shapes.x, 1) >= 32", "dim(shapes.x, 1) % 4 != 0", "pointwiseResourcesOk", "pointwiseDispatchOk"],
|
| 403 |
+
"derive": {
|
| 404 |
+
"hasAZero": false,
|
| 405 |
+
"hasBZero": true,
|
| 406 |
+
"tileM": "pointwiseTileM",
|
| 407 |
+
"tileN": "pointwiseTileN",
|
| 408 |
+
"ktWords": "pointwiseKtWords",
|
| 409 |
+
"aPacked": false
|
| 410 |
+
},
|
| 411 |
+
"passes": [
|
| 412 |
+
{
|
| 413 |
+
"id": "main",
|
| 414 |
+
"name": "ConvInteger.Dp4aPointwiseTail",
|
| 415 |
+
"shader": "quant-dp4a-matmul.wgsl.jinja",
|
| 416 |
+
"bindings": ["a_w", "b_x", "b_zero_point", "y", "params_quant_dp4a_matmul"],
|
| 417 |
+
"dispatch": {
|
| 418 |
+
"x": "ceilDiv(outputHeight * outputWidth, pointwiseTileN)",
|
| 419 |
+
"y": "ceilDiv(dim(shapes.w, 0), pointwiseTileM)",
|
| 420 |
+
"z": "dim(shapes.y, 0)"
|
| 421 |
+
}
|
| 422 |
+
}
|
| 423 |
+
]
|
| 424 |
+
},
|
| 425 |
+
{
|
| 426 |
+
"id": "dp4a_pointwise_1x1_tail_w_zero_point_only",
|
| 427 |
+
"priority": 21,
|
| 428 |
+
"when": ["nchwTensorOk", "ungroupedChannelsOk", "kernelHeight == 1", "kernelWidth == 1", "strideH == 1", "strideW == 1", "padTop == 0 and padBottom == 0", "padLeft == 0 and padRight == 0", "outputHeight == inputHeight", "outputWidth == inputWidth", "not present.x_zero_point", "scalarWZeroRequiredOk", "dim(shapes.x, 1) >= 32", "dim(shapes.x, 1) % 4 != 0", "pointwiseResourcesOk", "pointwiseDispatchOk"],
|
| 429 |
+
"derive": {
|
| 430 |
+
"hasAZero": true,
|
| 431 |
+
"hasBZero": false,
|
| 432 |
+
"tileM": "pointwiseTileM",
|
| 433 |
+
"tileN": "pointwiseTileN",
|
| 434 |
+
"ktWords": "pointwiseKtWords",
|
| 435 |
+
"aPacked": false
|
| 436 |
+
},
|
| 437 |
+
"passes": [
|
| 438 |
+
{
|
| 439 |
+
"id": "main",
|
| 440 |
+
"name": "ConvInteger.Dp4aPointwiseTail",
|
| 441 |
+
"shader": "quant-dp4a-matmul.wgsl.jinja",
|
| 442 |
+
"bindings": ["a_w", "b_x", "a_zero_point", "y", "params_quant_dp4a_matmul"],
|
| 443 |
+
"dispatch": {
|
| 444 |
+
"x": "ceilDiv(outputHeight * outputWidth, pointwiseTileN)",
|
| 445 |
+
"y": "ceilDiv(dim(shapes.w, 0), pointwiseTileM)",
|
| 446 |
+
"z": "dim(shapes.y, 0)"
|
| 447 |
+
}
|
| 448 |
+
}
|
| 449 |
+
]
|
| 450 |
+
},
|
| 451 |
+
{
|
| 452 |
+
"id": "dp4a_pointwise_1x1_tail_no_zero_points",
|
| 453 |
+
"priority": 21,
|
| 454 |
+
"when": ["nchwTensorOk", "ungroupedChannelsOk", "kernelHeight == 1", "kernelWidth == 1", "strideH == 1", "strideW == 1", "padTop == 0 and padBottom == 0", "padLeft == 0 and padRight == 0", "outputHeight == inputHeight", "outputWidth == inputWidth", "not present.x_zero_point", "not present.w_zero_point", "dim(shapes.x, 1) >= 32", "dim(shapes.x, 1) % 4 != 0", "pointwiseResourcesOk", "pointwiseDispatchOk"],
|
| 455 |
+
"derive": {
|
| 456 |
+
"hasAZero": false,
|
| 457 |
+
"hasBZero": false,
|
| 458 |
+
"tileM": "pointwiseTileM",
|
| 459 |
+
"tileN": "pointwiseTileN",
|
| 460 |
+
"ktWords": "pointwiseKtWords",
|
| 461 |
+
"aPacked": false
|
| 462 |
+
},
|
| 463 |
+
"passes": [
|
| 464 |
+
{
|
| 465 |
+
"id": "main",
|
| 466 |
+
"name": "ConvInteger.Dp4aPointwiseTail",
|
| 467 |
+
"shader": "quant-dp4a-matmul.wgsl.jinja",
|
| 468 |
+
"bindings": ["a_w", "b_x", "y", "params_quant_dp4a_matmul"],
|
| 469 |
+
"dispatch": {
|
| 470 |
+
"x": "ceilDiv(outputHeight * outputWidth, pointwiseTileN)",
|
| 471 |
+
"y": "ceilDiv(dim(shapes.w, 0), pointwiseTileM)",
|
| 472 |
"z": "dim(shapes.y, 0)"
|
| 473 |
}
|
| 474 |
}
|
|
|
|
| 477 |
{
|
| 478 |
"id": "dp4a_pointwise_1x1",
|
| 479 |
"priority": 20,
|
| 480 |
+
"when": ["nchwTensorOk", "ungroupedChannelsOk", "kernelHeight == 1", "kernelWidth == 1", "strideH == 1", "strideW == 1", "padTop == 0 and padBottom == 0", "padLeft == 0 and padRight == 0", "outputHeight == inputHeight", "outputWidth == inputWidth", "scalarXZeroRequiredOk", "scalarWZeroRequiredOk", "dim(shapes.x, 1) % 4 == 0", "pointwiseResourcesOk", "pointwiseDispatchOk"],
|
| 481 |
"derive": {
|
|
|
|
|
|
|
| 482 |
"aVec4": "\"vec4<u32>\" if tensorDtypes.w == \"uint8\" else \"vec4<i32>\"",
|
|
|
|
|
|
|
| 483 |
"hasAZero": true,
|
| 484 |
"hasBZero": true,
|
| 485 |
+
"tileM": "pointwiseTileM",
|
| 486 |
+
"tileN": "pointwiseTileN",
|
| 487 |
+
"ktWords": "pointwiseKtWords"
|
|
|
|
|
|
|
|
|
|
| 488 |
},
|
| 489 |
"passes": [
|
| 490 |
{
|
| 491 |
"id": "main",
|
| 492 |
"name": "ConvInteger.Dp4aPointwise",
|
| 493 |
"shader": "quant-dp4a-matmul.wgsl.jinja",
|
| 494 |
+
"bindings": ["a", "b_x", "a_zero_point", "b_zero_point", "y", "params_quant_dp4a_matmul"],
|
| 495 |
"dispatch": {
|
| 496 |
+
"x": "ceilDiv(outputHeight * outputWidth, pointwiseTileN)",
|
| 497 |
+
"y": "ceilDiv(dim(shapes.w, 0), pointwiseTileM)",
|
| 498 |
+
"z": "dim(shapes.y, 0)"
|
| 499 |
+
}
|
| 500 |
+
}
|
| 501 |
+
]
|
| 502 |
+
},
|
| 503 |
+
{
|
| 504 |
+
"id": "dp4a_pointwise_1x1_x_zero_point_only",
|
| 505 |
+
"priority": 20,
|
| 506 |
+
"when": ["nchwTensorOk", "ungroupedChannelsOk", "kernelHeight == 1", "kernelWidth == 1", "strideH == 1", "strideW == 1", "padTop == 0 and padBottom == 0", "padLeft == 0 and padRight == 0", "outputHeight == inputHeight", "outputWidth == inputWidth", "scalarXZeroRequiredOk", "not present.w_zero_point", "dim(shapes.x, 1) % 4 == 0", "pointwiseResourcesOk", "pointwiseDispatchOk"],
|
| 507 |
+
"derive": {
|
| 508 |
+
"aVec4": "\"vec4<u32>\" if tensorDtypes.w == \"uint8\" else \"vec4<i32>\"",
|
| 509 |
+
"hasAZero": false,
|
| 510 |
+
"hasBZero": true,
|
| 511 |
+
"tileM": "pointwiseTileM",
|
| 512 |
+
"tileN": "pointwiseTileN",
|
| 513 |
+
"ktWords": "pointwiseKtWords"
|
| 514 |
+
},
|
| 515 |
+
"passes": [
|
| 516 |
+
{
|
| 517 |
+
"id": "main",
|
| 518 |
+
"name": "ConvInteger.Dp4aPointwise",
|
| 519 |
+
"shader": "quant-dp4a-matmul.wgsl.jinja",
|
| 520 |
+
"bindings": ["a", "b_x", "b_zero_point", "y", "params_quant_dp4a_matmul"],
|
| 521 |
+
"dispatch": {
|
| 522 |
+
"x": "ceilDiv(outputHeight * outputWidth, pointwiseTileN)",
|
| 523 |
+
"y": "ceilDiv(dim(shapes.w, 0), pointwiseTileM)",
|
| 524 |
+
"z": "dim(shapes.y, 0)"
|
| 525 |
+
}
|
| 526 |
+
}
|
| 527 |
+
]
|
| 528 |
+
},
|
| 529 |
+
{
|
| 530 |
+
"id": "dp4a_pointwise_1x1_w_zero_point_only",
|
| 531 |
+
"priority": 20,
|
| 532 |
+
"when": ["nchwTensorOk", "ungroupedChannelsOk", "kernelHeight == 1", "kernelWidth == 1", "strideH == 1", "strideW == 1", "padTop == 0 and padBottom == 0", "padLeft == 0 and padRight == 0", "outputHeight == inputHeight", "outputWidth == inputWidth", "not present.x_zero_point", "scalarWZeroRequiredOk", "dim(shapes.x, 1) % 4 == 0", "pointwiseResourcesOk", "pointwiseDispatchOk"],
|
| 533 |
+
"derive": {
|
| 534 |
+
"aVec4": "\"vec4<u32>\" if tensorDtypes.w == \"uint8\" else \"vec4<i32>\"",
|
| 535 |
+
"hasAZero": true,
|
| 536 |
+
"hasBZero": false,
|
| 537 |
+
"tileM": "pointwiseTileM",
|
| 538 |
+
"tileN": "pointwiseTileN",
|
| 539 |
+
"ktWords": "pointwiseKtWords"
|
| 540 |
+
},
|
| 541 |
+
"passes": [
|
| 542 |
+
{
|
| 543 |
+
"id": "main",
|
| 544 |
+
"name": "ConvInteger.Dp4aPointwise",
|
| 545 |
+
"shader": "quant-dp4a-matmul.wgsl.jinja",
|
| 546 |
+
"bindings": ["a", "b_x", "a_zero_point", "y", "params_quant_dp4a_matmul"],
|
| 547 |
+
"dispatch": {
|
| 548 |
+
"x": "ceilDiv(outputHeight * outputWidth, pointwiseTileN)",
|
| 549 |
+
"y": "ceilDiv(dim(shapes.w, 0), pointwiseTileM)",
|
| 550 |
+
"z": "dim(shapes.y, 0)"
|
| 551 |
+
}
|
| 552 |
+
}
|
| 553 |
+
]
|
| 554 |
+
},
|
| 555 |
+
{
|
| 556 |
+
"id": "dp4a_pointwise_1x1_no_zero_points",
|
| 557 |
+
"priority": 20,
|
| 558 |
+
"when": ["nchwTensorOk", "ungroupedChannelsOk", "kernelHeight == 1", "kernelWidth == 1", "strideH == 1", "strideW == 1", "padTop == 0 and padBottom == 0", "padLeft == 0 and padRight == 0", "outputHeight == inputHeight", "outputWidth == inputWidth", "not present.x_zero_point", "not present.w_zero_point", "dim(shapes.x, 1) % 4 == 0", "pointwiseResourcesOk", "pointwiseDispatchOk"],
|
| 559 |
+
"derive": {
|
| 560 |
+
"aVec4": "\"vec4<u32>\" if tensorDtypes.w == \"uint8\" else \"vec4<i32>\"",
|
| 561 |
+
"hasAZero": false,
|
| 562 |
+
"hasBZero": false,
|
| 563 |
+
"tileM": "pointwiseTileM",
|
| 564 |
+
"tileN": "pointwiseTileN",
|
| 565 |
+
"ktWords": "pointwiseKtWords"
|
| 566 |
+
},
|
| 567 |
+
"passes": [
|
| 568 |
+
{
|
| 569 |
+
"id": "main",
|
| 570 |
+
"name": "ConvInteger.Dp4aPointwise",
|
| 571 |
+
"shader": "quant-dp4a-matmul.wgsl.jinja",
|
| 572 |
+
"bindings": ["a", "b_x", "y", "params_quant_dp4a_matmul"],
|
| 573 |
+
"dispatch": {
|
| 574 |
+
"x": "ceilDiv(outputHeight * outputWidth, pointwiseTileN)",
|
| 575 |
+
"y": "ceilDiv(dim(shapes.w, 0), pointwiseTileM)",
|
| 576 |
+
"z": "dim(shapes.y, 0)"
|
| 577 |
+
}
|
| 578 |
+
}
|
| 579 |
+
]
|
| 580 |
+
},
|
| 581 |
+
{
|
| 582 |
+
"id": "dp4a_pointwise_1x1_tail_per_channel",
|
| 583 |
+
"priority": 21,
|
| 584 |
+
"when": ["nchwTensorOk", "ungroupedChannelsOk", "kernelHeight == 1", "kernelWidth == 1", "strideH == 1", "strideW == 1", "padTop == 0 and padBottom == 0", "padLeft == 0 and padRight == 0", "outputHeight == inputHeight", "outputWidth == inputWidth", "scalarXZeroRequiredOk", "present.w_zero_point", "ranks.w_zero_point == 1", "dim(shapes.w_zero_point, 0) == dim(shapes.w, 0)", "dim(shapes.x, 1) >= 32", "dim(shapes.x, 1) % 4 != 0", "pointwiseResourcesOk", "pointwiseDispatchOk"],
|
| 585 |
+
"derive": {
|
| 586 |
+
"hasAZero": true,
|
| 587 |
+
"hasBZero": true,
|
| 588 |
+
"tileM": "pointwiseTileM",
|
| 589 |
+
"tileN": "pointwiseTileN",
|
| 590 |
+
"ktWords": "pointwiseKtWords",
|
| 591 |
+
"aPacked": false,
|
| 592 |
+
"aZeroPerRow": true
|
| 593 |
+
},
|
| 594 |
+
"passes": [
|
| 595 |
+
{
|
| 596 |
+
"id": "main",
|
| 597 |
+
"name": "ConvInteger.Dp4aPointwiseTail",
|
| 598 |
+
"shader": "quant-dp4a-matmul.wgsl.jinja",
|
| 599 |
+
"bindings": ["a_w", "b_x", "a_zero_point_per_row", "b_zero_point", "y", "params_quant_dp4a_matmul"],
|
| 600 |
+
"dispatch": {
|
| 601 |
+
"x": "ceilDiv(outputHeight * outputWidth, pointwiseTileN)",
|
| 602 |
+
"y": "ceilDiv(dim(shapes.w, 0), pointwiseTileM)",
|
| 603 |
+
"z": "dim(shapes.y, 0)"
|
| 604 |
+
}
|
| 605 |
+
}
|
| 606 |
+
]
|
| 607 |
+
},
|
| 608 |
+
{
|
| 609 |
+
"id": "dp4a_pointwise_1x1_tail_per_channel_w_zero_point_only",
|
| 610 |
+
"priority": 21,
|
| 611 |
+
"when": ["nchwTensorOk", "ungroupedChannelsOk", "kernelHeight == 1", "kernelWidth == 1", "strideH == 1", "strideW == 1", "padTop == 0 and padBottom == 0", "padLeft == 0 and padRight == 0", "outputHeight == inputHeight", "outputWidth == inputWidth", "not present.x_zero_point", "present.w_zero_point", "ranks.w_zero_point == 1", "dim(shapes.w_zero_point, 0) == dim(shapes.w, 0)", "dim(shapes.x, 1) >= 32", "dim(shapes.x, 1) % 4 != 0", "pointwiseResourcesOk", "pointwiseDispatchOk"],
|
| 612 |
+
"derive": {
|
| 613 |
+
"hasAZero": true,
|
| 614 |
+
"hasBZero": false,
|
| 615 |
+
"tileM": "pointwiseTileM",
|
| 616 |
+
"tileN": "pointwiseTileN",
|
| 617 |
+
"ktWords": "pointwiseKtWords",
|
| 618 |
+
"aPacked": false,
|
| 619 |
+
"aZeroPerRow": true
|
| 620 |
+
},
|
| 621 |
+
"passes": [
|
| 622 |
+
{
|
| 623 |
+
"id": "main",
|
| 624 |
+
"name": "ConvInteger.Dp4aPointwiseTail",
|
| 625 |
+
"shader": "quant-dp4a-matmul.wgsl.jinja",
|
| 626 |
+
"bindings": ["a_w", "b_x", "a_zero_point_per_row", "y", "params_quant_dp4a_matmul"],
|
| 627 |
+
"dispatch": {
|
| 628 |
+
"x": "ceilDiv(outputHeight * outputWidth, pointwiseTileN)",
|
| 629 |
+
"y": "ceilDiv(dim(shapes.w, 0), pointwiseTileM)",
|
| 630 |
+
"z": "dim(shapes.y, 0)"
|
| 631 |
+
}
|
| 632 |
+
}
|
| 633 |
+
]
|
| 634 |
+
},
|
| 635 |
+
{
|
| 636 |
+
"id": "dp4a_pointwise_1x1_per_channel",
|
| 637 |
+
"priority": 20,
|
| 638 |
+
"when": ["nchwTensorOk", "ungroupedChannelsOk", "kernelHeight == 1", "kernelWidth == 1", "strideH == 1", "strideW == 1", "padTop == 0 and padBottom == 0", "padLeft == 0 and padRight == 0", "outputHeight == inputHeight", "outputWidth == inputWidth", "scalarXZeroRequiredOk", "present.w_zero_point", "ranks.w_zero_point == 1", "dim(shapes.w_zero_point, 0) == dim(shapes.w, 0)", "dim(shapes.x, 1) % 4 == 0", "pointwiseResourcesOk", "pointwiseDispatchOk"],
|
| 639 |
+
"derive": {
|
| 640 |
+
"aVec4": "\"vec4<u32>\" if tensorDtypes.w == \"uint8\" else \"vec4<i32>\"",
|
| 641 |
+
"hasAZero": true,
|
| 642 |
+
"hasBZero": true,
|
| 643 |
+
"tileM": "pointwiseTileM",
|
| 644 |
+
"tileN": "pointwiseTileN",
|
| 645 |
+
"ktWords": "pointwiseKtWords",
|
| 646 |
+
"aZeroPerRow": true
|
| 647 |
+
},
|
| 648 |
+
"passes": [
|
| 649 |
+
{
|
| 650 |
+
"id": "main",
|
| 651 |
+
"name": "ConvInteger.Dp4aPointwise",
|
| 652 |
+
"shader": "quant-dp4a-matmul.wgsl.jinja",
|
| 653 |
+
"bindings": ["a", "b_x", "a_zero_point_per_row", "b_zero_point", "y", "params_quant_dp4a_matmul"],
|
| 654 |
+
"dispatch": {
|
| 655 |
+
"x": "ceilDiv(outputHeight * outputWidth, pointwiseTileN)",
|
| 656 |
+
"y": "ceilDiv(dim(shapes.w, 0), pointwiseTileM)",
|
| 657 |
+
"z": "dim(shapes.y, 0)"
|
| 658 |
+
}
|
| 659 |
+
}
|
| 660 |
+
]
|
| 661 |
+
},
|
| 662 |
+
{
|
| 663 |
+
"id": "dp4a_pointwise_1x1_per_channel_w_zero_point_only",
|
| 664 |
+
"priority": 20,
|
| 665 |
+
"when": ["nchwTensorOk", "ungroupedChannelsOk", "kernelHeight == 1", "kernelWidth == 1", "strideH == 1", "strideW == 1", "padTop == 0 and padBottom == 0", "padLeft == 0 and padRight == 0", "outputHeight == inputHeight", "outputWidth == inputWidth", "not present.x_zero_point", "present.w_zero_point", "ranks.w_zero_point == 1", "dim(shapes.w_zero_point, 0) == dim(shapes.w, 0)", "dim(shapes.x, 1) % 4 == 0", "pointwiseResourcesOk", "pointwiseDispatchOk"],
|
| 666 |
+
"derive": {
|
| 667 |
+
"aVec4": "\"vec4<u32>\" if tensorDtypes.w == \"uint8\" else \"vec4<i32>\"",
|
| 668 |
+
"hasAZero": true,
|
| 669 |
+
"hasBZero": false,
|
| 670 |
+
"tileM": "pointwiseTileM",
|
| 671 |
+
"tileN": "pointwiseTileN",
|
| 672 |
+
"ktWords": "pointwiseKtWords",
|
| 673 |
+
"aZeroPerRow": true
|
| 674 |
+
},
|
| 675 |
+
"passes": [
|
| 676 |
+
{
|
| 677 |
+
"id": "main",
|
| 678 |
+
"name": "ConvInteger.Dp4aPointwise",
|
| 679 |
+
"shader": "quant-dp4a-matmul.wgsl.jinja",
|
| 680 |
+
"bindings": ["a", "b_x", "a_zero_point_per_row", "y", "params_quant_dp4a_matmul"],
|
| 681 |
+
"dispatch": {
|
| 682 |
+
"x": "ceilDiv(outputHeight * outputWidth, pointwiseTileN)",
|
| 683 |
+
"y": "ceilDiv(dim(shapes.w, 0), pointwiseTileM)",
|
| 684 |
"z": "dim(shapes.y, 0)"
|
| 685 |
}
|
| 686 |
}
|
|
|
|
| 690 |
"id": "nchw2d_per_channel_zero_point",
|
| 691 |
"priority": 5,
|
| 692 |
"when": ["nchwTensorOk", "scalarXZeroRequiredOk", "ranks.w_zero_point == 1", "dim(shapes.w_zero_point, 0) == dim(shapes.w, 0)", "groupChannelsOk", "outputSpatialShapeOk"],
|
| 693 |
+
"derive": { "wZeroPerChannel": true },
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 694 |
"passes": [
|
| 695 |
{
|
| 696 |
"id": "main",
|
| 697 |
"name": "ConvIntegerPerChannel",
|
| 698 |
"shader": "conv-int-accumulate-spatial.wgsl.jinja",
|
| 699 |
"derive": { "spatialRankSpec": 2, "xZeroOmitted": "false", "wZeroOmitted": "false" },
|
| 700 |
+
"bindings": ["x_main", "w", "x_zero_point_main", "w_zero_point", "y", "params_nchw2d_x_zero_point_only"],
|
| 701 |
"dispatch": {
|
| 702 |
"x": "min(ceilDiv((numel(shapes.y)), (tunables.WORKGROUP_SIZE)), 65535)",
|
| 703 |
"y": "ceilDiv(ceilDiv((numel(shapes.y)), (tunables.WORKGROUP_SIZE)), 65535)",
|
|
|
|
| 710 |
"id": "nchw2d_per_channel_w_zero_point_only",
|
| 711 |
"priority": 5,
|
| 712 |
"when": ["nchwTensorOk", "not present.x_zero_point", "present.w_zero_point", "ranks.w_zero_point == 1", "dim(shapes.w_zero_point, 0) == dim(shapes.w, 0)", "groupChannelsOk", "outputSpatialShapeOk"],
|
| 713 |
+
"derive": { "wZeroPerChannel": true },
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 714 |
"passes": [
|
| 715 |
{
|
| 716 |
"id": "main",
|
| 717 |
"name": "ConvIntegerPerChannel",
|
| 718 |
"shader": "conv-int-accumulate-spatial.wgsl.jinja",
|
| 719 |
"derive": { "spatialRankSpec": 2, "xZeroOmitted": "true", "wZeroOmitted": "false" },
|
| 720 |
+
"bindings": ["x_main", "w", "w_zero_point", "y", "params_nchw2d_x_zero_point_only"],
|
| 721 |
"dispatch": {
|
| 722 |
"x": "min(ceilDiv((numel(shapes.y)), (tunables.WORKGROUP_SIZE)), 65535)",
|
| 723 |
"y": "ceilDiv(ceilDiv((numel(shapes.y)), (tunables.WORKGROUP_SIZE)), 65535)",
|
|
|
|
| 729 |
{
|
| 730 |
"id": "nchw2d_scalar_zero_points",
|
| 731 |
"when": ["nchwTensorOk", "scalarXZeroRequiredOk", "scalarWZeroRequiredOk", "groupChannelsOk", "outputSpatialShapeOk"],
|
| 732 |
+
"derive": {},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 733 |
"passes": [
|
| 734 |
{
|
| 735 |
"id": "main",
|
| 736 |
"name": "ConvInteger",
|
| 737 |
"shader": "conv-int-accumulate-spatial.wgsl.jinja",
|
| 738 |
"derive": { "spatialRankSpec": 2, "xZeroOmitted": "false", "wZeroOmitted": "false" },
|
| 739 |
+
"bindings": ["x_main", "w", "x_zero_point_main", "w_zero_point_main", "y", "params_nchw2d_x_zero_point_only"],
|
| 740 |
"dispatch": {
|
| 741 |
"x": "min(ceilDiv((numel(shapes.y)), (tunables.WORKGROUP_SIZE)), 65535)",
|
| 742 |
"y": "ceilDiv(ceilDiv((numel(shapes.y)), (tunables.WORKGROUP_SIZE)), 65535)",
|
|
|
|
| 748 |
{
|
| 749 |
"id": "nchw2d_x_zero_point_only",
|
| 750 |
"when": ["nchwTensorOk", "present.x_zero_point", "not present.w_zero_point", "scalarXZeroRequiredOk", "groupChannelsOk", "outputSpatialShapeOk"],
|
| 751 |
+
"derive": {},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 752 |
"passes": [
|
| 753 |
{
|
| 754 |
"id": "main",
|
| 755 |
"name": "ConvInteger",
|
| 756 |
"shader": "conv-int-accumulate-spatial.wgsl.jinja",
|
| 757 |
"derive": { "spatialRankSpec": 2, "xZeroOmitted": "false", "wZeroOmitted": "true" },
|
| 758 |
+
"bindings": ["x_main", "w", "x_zero_point_main", "y", "params_nchw2d_x_zero_point_only"],
|
| 759 |
"dispatch": {
|
| 760 |
"x": "min(ceilDiv((numel(shapes.y)), (tunables.WORKGROUP_SIZE)), 65535)",
|
| 761 |
"y": "ceilDiv(ceilDiv((numel(shapes.y)), (tunables.WORKGROUP_SIZE)), 65535)",
|
|
|
|
| 767 |
{
|
| 768 |
"id": "nchw2d_w_zero_point_only",
|
| 769 |
"when": ["nchwTensorOk", "not present.x_zero_point", "present.w_zero_point", "scalarWZeroRequiredOk", "groupChannelsOk", "outputSpatialShapeOk"],
|
| 770 |
+
"derive": {},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 771 |
"passes": [
|
| 772 |
{
|
| 773 |
"id": "main",
|
| 774 |
"name": "ConvInteger",
|
| 775 |
"shader": "conv-int-accumulate-spatial.wgsl.jinja",
|
| 776 |
"derive": { "spatialRankSpec": 2, "xZeroOmitted": "true", "wZeroOmitted": "false" },
|
| 777 |
+
"bindings": ["x_main", "w", "w_zero_point_main", "y", "params_nchw2d_x_zero_point_only"],
|
| 778 |
"dispatch": {
|
| 779 |
"x": "min(ceilDiv((numel(shapes.y)), (tunables.WORKGROUP_SIZE)), 65535)",
|
| 780 |
"y": "ceilDiv(ceilDiv((numel(shapes.y)), (tunables.WORKGROUP_SIZE)), 65535)",
|
|
|
|
| 786 |
{
|
| 787 |
"id": "ncdhw3d_scalar_zero_points",
|
| 788 |
"when": ["rank5TensorOk", "scalarXZeroRequiredOk", "scalarWZeroRequiredOk", "groupChannelsOk", "output3dShapeOk"],
|
| 789 |
+
"derive": {},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 790 |
"passes": [
|
| 791 |
{
|
| 792 |
"id": "main",
|
| 793 |
"name": "ConvInteger3d",
|
| 794 |
"shader": "conv-int-accumulate-spatial.wgsl.jinja",
|
| 795 |
"derive": { "spatialRankSpec": 3, "xZeroOmitted": "false", "wZeroOmitted": "false" },
|
| 796 |
+
"bindings": ["x_main", "w", "x_zero_point_main", "w_zero_point_main", "y", "params_ncdhw3d_x_zero_point_only"],
|
| 797 |
"dispatch": {
|
| 798 |
"x": "min(ceilDiv((numel(shapes.y)), (tunables.WORKGROUP_SIZE)), 65535)",
|
| 799 |
"y": "ceilDiv(ceilDiv((numel(shapes.y)), (tunables.WORKGROUP_SIZE)), 65535)",
|
|
|
|
| 805 |
{
|
| 806 |
"id": "ncdhw3d_x_zero_point_only",
|
| 807 |
"when": ["rank5TensorOk", "scalarXZeroRequiredOk", "not present.w_zero_point", "groupChannelsOk", "output3dShapeOk"],
|
| 808 |
+
"derive": {},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 809 |
"passes": [
|
| 810 |
{
|
| 811 |
"id": "main",
|
| 812 |
"name": "ConvInteger3d",
|
| 813 |
"shader": "conv-int-accumulate-spatial.wgsl.jinja",
|
| 814 |
"derive": { "spatialRankSpec": 3, "xZeroOmitted": "false", "wZeroOmitted": "true" },
|
| 815 |
+
"bindings": ["x_main", "w", "x_zero_point_main", "y", "params_ncdhw3d_x_zero_point_only"],
|
| 816 |
"dispatch": {
|
| 817 |
"x": "min(ceilDiv((numel(shapes.y)), (tunables.WORKGROUP_SIZE)), 65535)",
|
| 818 |
"y": "ceilDiv(ceilDiv((numel(shapes.y)), (tunables.WORKGROUP_SIZE)), 65535)",
|
|
|
|
| 824 |
{
|
| 825 |
"id": "ncdhw3d_w_zero_point_only",
|
| 826 |
"when": ["rank5TensorOk", "not present.x_zero_point", "scalarWZeroRequiredOk", "groupChannelsOk", "output3dShapeOk"],
|
| 827 |
+
"derive": {},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 828 |
"passes": [
|
| 829 |
{
|
| 830 |
"id": "main",
|
| 831 |
"name": "ConvInteger3d",
|
| 832 |
"shader": "conv-int-accumulate-spatial.wgsl.jinja",
|
| 833 |
"derive": { "spatialRankSpec": 3, "xZeroOmitted": "true", "wZeroOmitted": "false" },
|
| 834 |
+
"bindings": ["x_main", "w", "w_zero_point_main", "y", "params_ncdhw3d_x_zero_point_only"],
|
| 835 |
"dispatch": {
|
| 836 |
"x": "min(ceilDiv((numel(shapes.y)), (tunables.WORKGROUP_SIZE)), 65535)",
|
| 837 |
"y": "ceilDiv(ceilDiv((numel(shapes.y)), (tunables.WORKGROUP_SIZE)), 65535)",
|
|
|
|
| 843 |
{
|
| 844 |
"id": "ncdhw3d_implicit_zero_points",
|
| 845 |
"when": ["rank5TensorOk", "zeroPointsOmitted", "groupChannelsOk", "output3dShapeOk"],
|
| 846 |
+
"derive": {},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 847 |
"passes": [
|
| 848 |
{
|
| 849 |
"id": "main",
|
| 850 |
"name": "ConvInteger3d",
|
| 851 |
"shader": "conv-int-accumulate-spatial.wgsl.jinja",
|
| 852 |
"derive": { "spatialRankSpec": 3, "xZeroOmitted": "true", "wZeroOmitted": "true" },
|
| 853 |
+
"bindings": ["x_main", "w", "y", "params_ncdhw3d_x_zero_point_only"],
|
| 854 |
"dispatch": {
|
| 855 |
"x": "min(ceilDiv((numel(shapes.y)), (tunables.WORKGROUP_SIZE)), 65535)",
|
| 856 |
"y": "ceilDiv(ceilDiv((numel(shapes.y)), (tunables.WORKGROUP_SIZE)), 65535)",
|
|
|
|
| 862 |
{
|
| 863 |
"id": "nchw_implicit_zero_points",
|
| 864 |
"when": ["nchwTensorOk", "zeroPointsOmitted", "groupChannelsOk", "outputSpatialShapeOk"],
|
| 865 |
+
"derive": {},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 866 |
"passes": [
|
| 867 |
{
|
| 868 |
"id": "main",
|
| 869 |
"name": "ConvInteger",
|
| 870 |
"shader": "conv-int-accumulate-spatial.wgsl.jinja",
|
| 871 |
"derive": { "spatialRankSpec": 2, "xZeroOmitted": "true", "wZeroOmitted": "true" },
|
| 872 |
+
"bindings": ["x_main", "w", "y", "params_nchw2d_x_zero_point_only"],
|
| 873 |
"dispatch": {
|
| 874 |
"x": "min(ceilDiv((numel(shapes.y)), (tunables.WORKGROUP_SIZE)), 65535)",
|
| 875 |
"y": "ceilDiv(ceilDiv((numel(shapes.y)), (tunables.WORKGROUP_SIZE)), 65535)",
|
build/webgpu/metadata.json
CHANGED
|
@@ -1,28 +1,38 @@
|
|
| 1 |
{
|
| 2 |
"name": "ai.onnx.ConvInteger",
|
| 3 |
-
"id": "
|
| 4 |
"version": 1,
|
| 5 |
"license": "Apache-2.0",
|
| 6 |
"backend": { "type": "webgpu" },
|
| 7 |
"digest": {
|
| 8 |
"algorithm": "sha256",
|
| 9 |
"files": {
|
| 10 |
-
"bench.json": "
|
| 11 |
-
"conv-int-accumulate-spatial.wgsl.jinja": "
|
| 12 |
-
"conv-int-im2col-spatial.wgsl.jinja": "
|
| 13 |
-
"manifest.json": "
|
| 14 |
-
"quant-dp4a-matmul.wgsl.jinja": "
|
| 15 |
-
"test.json": "
|
| 16 |
}
|
| 17 |
},
|
| 18 |
-
"provenance": { "kernel": { "sha": "
|
| 19 |
"webgpu": {
|
| 20 |
-
"manifestSpec": "2.
|
| 21 |
"variants": {
|
| 22 |
"dp4a_im2col_ncdhw3d_scalar_zero_points": ["conv-int-im2col-spatial.wgsl.jinja", "quant-dp4a-matmul.wgsl.jinja"],
|
| 23 |
"dp4a_im2col_nchw_scalar_zero_points": ["conv-int-im2col-spatial.wgsl.jinja", "quant-dp4a-matmul.wgsl.jinja"],
|
| 24 |
"dp4a_pointwise_1x1_tail": ["quant-dp4a-matmul.wgsl.jinja"],
|
|
|
|
|
|
|
|
|
|
| 25 |
"dp4a_pointwise_1x1": ["quant-dp4a-matmul.wgsl.jinja"],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
"nchw2d_per_channel_zero_point": ["conv-int-accumulate-spatial.wgsl.jinja"],
|
| 27 |
"nchw2d_per_channel_w_zero_point_only": ["conv-int-accumulate-spatial.wgsl.jinja"],
|
| 28 |
"nchw2d_scalar_zero_points": ["conv-int-accumulate-spatial.wgsl.jinja"],
|
|
|
|
| 1 |
{
|
| 2 |
"name": "ai.onnx.ConvInteger",
|
| 3 |
+
"id": "_ai_onnx_convinteger_webgpu_befbf8c",
|
| 4 |
"version": 1,
|
| 5 |
"license": "Apache-2.0",
|
| 6 |
"backend": { "type": "webgpu" },
|
| 7 |
"digest": {
|
| 8 |
"algorithm": "sha256",
|
| 9 |
"files": {
|
| 10 |
+
"bench.json": "w1Y+YvLhm6rmHnI3I6fdQTErLMPyr5es6PymArrgGTA=",
|
| 11 |
+
"conv-int-accumulate-spatial.wgsl.jinja": "7393dtsdsogF8Zzus4+gZiwygpXHb15ZTWhE9VM83UA=",
|
| 12 |
+
"conv-int-im2col-spatial.wgsl.jinja": "rUkI3zRiXYyD3r5GvVRqfcLMijHGc2KA71kljasROJM=",
|
| 13 |
+
"manifest.json": "guLLSG4M/NsDkfMSVXE0qMhQ2L9fYa8oY2GLgeyOXME=",
|
| 14 |
+
"quant-dp4a-matmul.wgsl.jinja": "hfcRmXhc3rBZU5qOfHyf75KqjiAmJpqzTY7BlyvoyC8=",
|
| 15 |
+
"test.json": "T5Q9TkFCTbjYtbC//Z9DuWYARBX+XkneiZt+RCoNamI="
|
| 16 |
}
|
| 17 |
},
|
| 18 |
+
"provenance": { "kernel": { "sha": "6fdf6301e2bbcc2f03bf1eaf493b7ad55ef33afc", "dirty": false } },
|
| 19 |
"webgpu": {
|
| 20 |
+
"manifestSpec": "2.1",
|
| 21 |
"variants": {
|
| 22 |
"dp4a_im2col_ncdhw3d_scalar_zero_points": ["conv-int-im2col-spatial.wgsl.jinja", "quant-dp4a-matmul.wgsl.jinja"],
|
| 23 |
"dp4a_im2col_nchw_scalar_zero_points": ["conv-int-im2col-spatial.wgsl.jinja", "quant-dp4a-matmul.wgsl.jinja"],
|
| 24 |
"dp4a_pointwise_1x1_tail": ["quant-dp4a-matmul.wgsl.jinja"],
|
| 25 |
+
"dp4a_pointwise_1x1_tail_x_zero_point_only": ["quant-dp4a-matmul.wgsl.jinja"],
|
| 26 |
+
"dp4a_pointwise_1x1_tail_w_zero_point_only": ["quant-dp4a-matmul.wgsl.jinja"],
|
| 27 |
+
"dp4a_pointwise_1x1_tail_no_zero_points": ["quant-dp4a-matmul.wgsl.jinja"],
|
| 28 |
"dp4a_pointwise_1x1": ["quant-dp4a-matmul.wgsl.jinja"],
|
| 29 |
+
"dp4a_pointwise_1x1_x_zero_point_only": ["quant-dp4a-matmul.wgsl.jinja"],
|
| 30 |
+
"dp4a_pointwise_1x1_w_zero_point_only": ["quant-dp4a-matmul.wgsl.jinja"],
|
| 31 |
+
"dp4a_pointwise_1x1_no_zero_points": ["quant-dp4a-matmul.wgsl.jinja"],
|
| 32 |
+
"dp4a_pointwise_1x1_tail_per_channel": ["quant-dp4a-matmul.wgsl.jinja"],
|
| 33 |
+
"dp4a_pointwise_1x1_tail_per_channel_w_zero_point_only": ["quant-dp4a-matmul.wgsl.jinja"],
|
| 34 |
+
"dp4a_pointwise_1x1_per_channel": ["quant-dp4a-matmul.wgsl.jinja"],
|
| 35 |
+
"dp4a_pointwise_1x1_per_channel_w_zero_point_only": ["quant-dp4a-matmul.wgsl.jinja"],
|
| 36 |
"nchw2d_per_channel_zero_point": ["conv-int-accumulate-spatial.wgsl.jinja"],
|
| 37 |
"nchw2d_per_channel_w_zero_point_only": ["conv-int-accumulate-spatial.wgsl.jinja"],
|
| 38 |
"nchw2d_scalar_zero_points": ["conv-int-accumulate-spatial.wgsl.jinja"],
|
build/webgpu/quant-dp4a-matmul.wgsl.jinja
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
{% if not env.device.wgslLanguageFeatures.has("packed_4x8_integer_dot_product") %}
|
| 2 |
// Runtime source-compatible fallbacks for the packed 4x8 integer built-ins used
|
| 3 |
// by quantized kernels. Native implementations remain unshadowed when the
|
|
@@ -19,15 +35,22 @@
|
|
| 19 |
{% endif %}
|
| 20 |
{{ env.wgsl.resourceDeclarations }}
|
| 21 |
|
| 22 |
-
|
| 23 |
const TILE_M: u32 = {{ tileM }}u;
|
| 24 |
const TILE_N: u32 = {{ tileN }}u;
|
| 25 |
const KT_WORDS: u32 = {{ ktWords }}u;
|
| 26 |
const A_TILE_WORDS: u32 = TILE_M * KT_WORDS;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
|
|
|
|
|
|
|
| 28 |
var<workgroup> a_tile: array<u32, A_TILE_WORDS>;
|
|
|
|
| 29 |
var<workgroup> a_row_sum: array<atomic<i32>, TILE_M>;
|
| 30 |
|
|
|
|
| 31 |
// Pack 4 widened A values into one u32 (byte 0 = lowest k).
|
| 32 |
fn pack_a(v: vec4<{{ aScalar }}>) -> u32 {
|
| 33 |
{% if aUnsigned %}
|
|
@@ -37,6 +60,7 @@ fn pack_a(v: vec4<{{ aScalar }}>) -> u32 {
|
|
| 37 |
return (u32(v.x) & 0xFFu) | ((u32(v.y) & 0xFFu) << 8u) | ((u32(v.z) & 0xFFu) << 16u) | ((u32(v.w) & 0xFFu) << 24u);
|
| 38 |
{% endif %}
|
| 39 |
}
|
|
|
|
| 40 |
|
| 41 |
// Sum of the 4 bias-shifted A values of one packed word.
|
| 42 |
fn sum4_a(v: vec4<{{ aScalar }}>) -> i32 {
|
|
@@ -47,6 +71,7 @@ fn sum4_a(v: vec4<{{ aScalar }}>) -> i32 {
|
|
| 47 |
{% endif %}
|
| 48 |
}
|
| 49 |
|
|
|
|
| 50 |
fn pack_b(b0: {{ bScalar }}, b1: {{ bScalar }}, b2: {{ bScalar }}, b3: {{ bScalar }}) -> u32 {
|
| 51 |
{% if bUnsigned %}
|
| 52 |
return ((b0 ^ 0x80u) & 0xFFu) | (((b1 ^ 0x80u) & 0xFFu) << 8u) | (((b2 ^ 0x80u) & 0xFFu) << 16u) | (((b3 ^ 0x80u) & 0xFFu) << 24u);
|
|
@@ -60,7 +85,7 @@ fn pack_b(b0: {{ bScalar }}, b1: {{ bScalar }}, b2: {{ bScalar }}, b3: {{ bScala
|
|
| 60 |
fn dot4_packed(a_word: u32, b_word: u32) -> i32 {
|
| 61 |
return dot4I8Packed(a_word, b_word);
|
| 62 |
}
|
| 63 |
-
|
| 64 |
|
| 65 |
fn sum4_b(b0: {{ bScalar }}, b1: {{ bScalar }}, b2: {{ bScalar }}, b3: {{ bScalar }}) -> i32 {
|
| 66 |
{% if bUnsigned %}
|
|
@@ -70,30 +95,15 @@ fn sum4_b(b0: {{ bScalar }}, b1: {{ bScalar }}, b2: {{ bScalar }}, b3: {{ bScala
|
|
| 70 |
{% endif %}
|
| 71 |
}
|
| 72 |
|
| 73 |
-
fn read_a_zero({% if aZeroPerRow %}row: u32{% endif %}) -> i32 {
|
| 74 |
-
{% if aZeroPerRow %}
|
| 75 |
-
{% if aUnsigned %}
|
| 76 |
-
return i32(a_zero_point[row]);
|
| 77 |
-
{% else %}
|
| 78 |
-
return a_zero_point[row];
|
| 79 |
-
{% endif %}
|
| 80 |
-
{% else %}
|
| 81 |
-
{% if aUnsigned %}
|
| 82 |
-
return i32(a_zero_point[0]);
|
| 83 |
-
{% else %}
|
| 84 |
-
return a_zero_point[0];
|
| 85 |
{% endif %}
|
| 86 |
-
{%
|
| 87 |
-
}
|
| 88 |
|
| 89 |
-
fn read_b_zero() -> i32 {
|
| 90 |
-
{% if bUnsigned %}
|
| 91 |
-
return i32(b_zero_point[0]);
|
| 92 |
-
{% else %}
|
| 93 |
-
return b_zero_point[0];
|
| 94 |
{% endif %}
|
| 95 |
-
}
|
|
|
|
| 96 |
|
|
|
|
| 97 |
@compute @workgroup_size(TILE_N, 1, 1)
|
| 98 |
fn main(@builtin(workgroup_id) wg: vec3<u32>, @builtin(local_invocation_id) lid: vec3<u32>) {
|
| 99 |
let batch = wg.z;
|
|
@@ -114,15 +124,31 @@ fn main(@builtin(workgroup_id) wg: vec3<u32>, @builtin(local_invocation_id) lid:
|
|
| 114 |
let k_words_total = params.K / 4u;
|
| 115 |
{% endif %}
|
| 116 |
|
|
|
|
| 117 |
if (tid < TILE_M) {
|
| 118 |
atomicStore(&a_row_sum[tid], 0);
|
| 119 |
}
|
| 120 |
workgroupBarrier();
|
| 121 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 122 |
{% for m in range(tileM) %}
|
| 123 |
var r{{ m }}: i32 = 0;
|
| 124 |
{% endfor %}
|
|
|
|
|
|
|
| 125 |
var sum_b: i32 = 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 126 |
|
| 127 |
for (var kw0 = 0u; kw0 < k_words_total; kw0 = kw0 + KT_WORDS) {
|
| 128 |
let words = min(KT_WORDS, k_words_total - kw0);
|
|
@@ -146,13 +172,49 @@ fn main(@builtin(workgroup_id) wg: vec3<u32>, @builtin(local_invocation_id) lid:
|
|
| 146 |
let v = a[a_base4 + src_m * k_words_total + kw0 + ki];
|
| 147 |
{% endif %}
|
| 148 |
packed = pack_a(v);
|
|
|
|
| 149 |
atomicAdd(&a_row_sum[mi], sum4_a(v));
|
|
|
|
| 150 |
}
|
| 151 |
a_tile[mi * KT_WORDS + ki] = packed;
|
| 152 |
}
|
| 153 |
workgroupBarrier();
|
| 154 |
|
| 155 |
if (n_valid) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 156 |
for (var kk = 0u; kk < words; kk = kk + 1u) {
|
| 157 |
let k4 = (kw0 + kk) * 4u;
|
| 158 |
let b_row = b_base + k4 * params.N + col;
|
|
@@ -160,12 +222,15 @@ fn main(@builtin(workgroup_id) wg: vec3<u32>, @builtin(local_invocation_id) lid:
|
|
| 160 |
let b1 = b[b_row + params.N];
|
| 161 |
let b2 = b[b_row + 2u * params.N];
|
| 162 |
let b3 = b[b_row + 3u * params.N];
|
|
|
|
| 163 |
sum_b = sum_b + sum4_b(b0, b1, b2, b3);
|
|
|
|
| 164 |
let bp = pack_b(b0, b1, b2, b3);
|
| 165 |
{% for m in range(tileM) %}
|
| 166 |
r{{ m }} = r{{ m }} + dot4_packed(a_tile[{{ m }}u * KT_WORDS + kk], bp);
|
| 167 |
{% endfor %}
|
| 168 |
}
|
|
|
|
| 169 |
}
|
| 170 |
workgroupBarrier();
|
| 171 |
}
|
|
@@ -190,7 +255,9 @@ fn main(@builtin(workgroup_id) wg: vec3<u32>, @builtin(local_invocation_id) lid:
|
|
| 190 |
let a3: {{ aScalar }} = {{ "128u" if aUnsigned else "0" }};
|
| 191 |
let v = vec4<{{ aScalar }}>(a0, a1, a2, a3);
|
| 192 |
packed = pack_a(v);
|
|
|
|
| 193 |
atomicAdd(&a_row_sum[tid], sum4_a(v));
|
|
|
|
| 194 |
}
|
| 195 |
a_tile[tid * KT_WORDS] = packed;
|
| 196 |
}
|
|
@@ -205,7 +272,9 @@ fn main(@builtin(workgroup_id) wg: vec3<u32>, @builtin(local_invocation_id) lid:
|
|
| 205 |
if (tail_lanes > 1u) { b1 = b[b_row + params.N]; }
|
| 206 |
if (tail_lanes > 2u) { b2 = b[b_row + 2u * params.N]; }
|
| 207 |
let b3: {{ bScalar }} = {{ "128u" if bUnsigned else "0" }};
|
|
|
|
| 208 |
sum_b = sum_b + sum4_b(b0, b1, b2, b3);
|
|
|
|
| 209 |
let bp = pack_b(b0, b1, b2, b3);
|
| 210 |
{% for m in range(tileM) %}
|
| 211 |
r{{ m }} = r{{ m }} + dot4_packed(a_tile[{{ m }}u * KT_WORDS], bp);
|
|
@@ -220,11 +289,14 @@ fn main(@builtin(workgroup_id) wg: vec3<u32>, @builtin(local_invocation_id) lid:
|
|
| 220 |
}
|
| 221 |
|
| 222 |
// Fold bias + zero-point corrections (exact in modular i32 arithmetic).
|
| 223 |
-
let cb: i32 = {{ "128" if bUnsigned else "0" }} - read_b_zero();
|
| 224 |
{% if not aZeroPerRow %}
|
| 225 |
-
let ca: i32 = {{ "128" if aUnsigned else "0" }} - read_a_zero();
|
| 226 |
let kcc: i32 = i32(params.K) * ca * cb;
|
| 227 |
{% endif %}
|
|
|
|
|
|
|
|
|
|
| 228 |
|
| 229 |
{% for m in range(tileM) %}
|
| 230 |
{
|
|
@@ -234,12 +306,16 @@ fn main(@builtin(workgroup_id) wg: vec3<u32>, @builtin(local_invocation_id) lid:
|
|
| 234 |
let ca: i32 = {{ "128" if aUnsigned else "0" }} - read_a_zero(mr);
|
| 235 |
let kcc: i32 = i32(params.K) * ca * cb;
|
| 236 |
{% endif %}
|
| 237 |
-
var acc = r{{ m }};
|
|
|
|
| 238 |
acc = acc + cb * atomicLoad(&a_row_sum[{{ m }}u]);
|
| 239 |
-
|
|
|
|
|
|
|
|
|
|
| 240 |
acc = acc + kcc;
|
| 241 |
{% if hasBias %}
|
| 242 |
-
acc = acc + bias[mr];
|
| 243 |
{% endif %}
|
| 244 |
y[y_base + mr * params.N + col] = acc;
|
| 245 |
}
|
|
|
|
| 1 |
+
{% macro quant_read_column_zero(fn_name, buffer_name, is_unsigned, present=true, per_column=false, param_name="col", return_type="i32") %}
|
| 2 |
+
fn {{ fn_name }}({% if per_column %}{{ param_name }}: u32{% endif %}) -> {{ return_type }} {
|
| 3 |
+
{% if per_column %}
|
| 4 |
+
{% if is_unsigned %}
|
| 5 |
+
return i32({{ buffer_name }}[{{ param_name }}]);
|
| 6 |
+
{% else %}
|
| 7 |
+
return {{ buffer_name }}[{{ param_name }}];
|
| 8 |
+
{% endif %}
|
| 9 |
+
{% else %}
|
| 10 |
+
{% if is_unsigned %}
|
| 11 |
+
return i32({{ buffer_name }}[0]);
|
| 12 |
+
{% else %}
|
| 13 |
+
return {{ buffer_name }}[0];
|
| 14 |
+
{% endif %}
|
| 15 |
+
{% endif %}
|
| 16 |
+
}{% endmacro %}
|
| 17 |
{% if not env.device.wgslLanguageFeatures.has("packed_4x8_integer_dot_product") %}
|
| 18 |
// Runtime source-compatible fallbacks for the packed 4x8 integer built-ins used
|
| 19 |
// by quantized kernels. Native implementations remain unshadowed when the
|
|
|
|
| 35 |
{% endif %}
|
| 36 |
{{ env.wgsl.resourceDeclarations }}
|
| 37 |
|
|
|
|
| 38 |
const TILE_M: u32 = {{ tileM }}u;
|
| 39 |
const TILE_N: u32 = {{ tileN }}u;
|
| 40 |
const KT_WORDS: u32 = {{ ktWords }}u;
|
| 41 |
const A_TILE_WORDS: u32 = TILE_M * KT_WORDS;
|
| 42 |
+
{% set GEMV_UNROLL = 4 %}
|
| 43 |
+
{% if tileM == 1 %}
|
| 44 |
+
const GEMV_K_UNROLL: u32 = {{ GEMV_UNROLL }}u;
|
| 45 |
+
{% endif %}
|
| 46 |
|
| 47 |
+
{% set needsASum = hasBZero or bUnsigned %}
|
| 48 |
+
{% set needsBSum = hasAZero or aUnsigned %}
|
| 49 |
var<workgroup> a_tile: array<u32, A_TILE_WORDS>;
|
| 50 |
+
{% if needsASum %}
|
| 51 |
var<workgroup> a_row_sum: array<atomic<i32>, TILE_M>;
|
| 52 |
|
| 53 |
+
{% endif %}
|
| 54 |
// Pack 4 widened A values into one u32 (byte 0 = lowest k).
|
| 55 |
fn pack_a(v: vec4<{{ aScalar }}>) -> u32 {
|
| 56 |
{% if aUnsigned %}
|
|
|
|
| 60 |
return (u32(v.x) & 0xFFu) | ((u32(v.y) & 0xFFu) << 8u) | ((u32(v.z) & 0xFFu) << 16u) | ((u32(v.w) & 0xFFu) << 24u);
|
| 61 |
{% endif %}
|
| 62 |
}
|
| 63 |
+
{% if needsASum %}
|
| 64 |
|
| 65 |
// Sum of the 4 bias-shifted A values of one packed word.
|
| 66 |
fn sum4_a(v: vec4<{{ aScalar }}>) -> i32 {
|
|
|
|
| 71 |
{% endif %}
|
| 72 |
}
|
| 73 |
|
| 74 |
+
{% endif %}
|
| 75 |
fn pack_b(b0: {{ bScalar }}, b1: {{ bScalar }}, b2: {{ bScalar }}, b3: {{ bScalar }}) -> u32 {
|
| 76 |
{% if bUnsigned %}
|
| 77 |
return ((b0 ^ 0x80u) & 0xFFu) | (((b1 ^ 0x80u) & 0xFFu) << 8u) | (((b2 ^ 0x80u) & 0xFFu) << 16u) | (((b3 ^ 0x80u) & 0xFFu) << 24u);
|
|
|
|
| 85 |
fn dot4_packed(a_word: u32, b_word: u32) -> i32 {
|
| 86 |
return dot4I8Packed(a_word, b_word);
|
| 87 |
}
|
| 88 |
+
{% if needsBSum %}
|
| 89 |
|
| 90 |
fn sum4_b(b0: {{ bScalar }}, b1: {{ bScalar }}, b2: {{ bScalar }}, b3: {{ bScalar }}) -> i32 {
|
| 91 |
{% if bUnsigned %}
|
|
|
|
| 95 |
{% endif %}
|
| 96 |
}
|
| 97 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 98 |
{% endif %}
|
| 99 |
+
{% if hasAZero %}
|
| 100 |
+
{{ quant_read_column_zero("read_a_zero", "a_zero_point", aUnsigned, per_column=aZeroPerRow, param_name="row") }}
|
| 101 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 102 |
{% endif %}
|
| 103 |
+
{% if hasBZero %}
|
| 104 |
+
{{ quant_read_column_zero("read_b_zero", "b_zero_point", bUnsigned, per_column=bZeroPerColumn) }}
|
| 105 |
|
| 106 |
+
{% endif %}
|
| 107 |
@compute @workgroup_size(TILE_N, 1, 1)
|
| 108 |
fn main(@builtin(workgroup_id) wg: vec3<u32>, @builtin(local_invocation_id) lid: vec3<u32>) {
|
| 109 |
let batch = wg.z;
|
|
|
|
| 124 |
let k_words_total = params.K / 4u;
|
| 125 |
{% endif %}
|
| 126 |
|
| 127 |
+
{% if needsASum %}
|
| 128 |
if (tid < TILE_M) {
|
| 129 |
atomicStore(&a_row_sum[tid], 0);
|
| 130 |
}
|
| 131 |
workgroupBarrier();
|
| 132 |
|
| 133 |
+
{% endif %}
|
| 134 |
+
{% if tileM == 1 %}
|
| 135 |
+
var r0: i32 = 0;
|
| 136 |
+
{% for u in range(1, GEMV_UNROLL) %}
|
| 137 |
+
var r0_{{ u }}: i32 = 0;
|
| 138 |
+
{% endfor %}
|
| 139 |
+
{% else %}
|
| 140 |
{% for m in range(tileM) %}
|
| 141 |
var r{{ m }}: i32 = 0;
|
| 142 |
{% endfor %}
|
| 143 |
+
{% endif %}
|
| 144 |
+
{% if needsBSum %}
|
| 145 |
var sum_b: i32 = 0;
|
| 146 |
+
{% if tileM == 1 %}
|
| 147 |
+
{% for u in range(1, GEMV_UNROLL) %}
|
| 148 |
+
var sum_b_{{ u }}: i32 = 0;
|
| 149 |
+
{% endfor %}
|
| 150 |
+
{% endif %}
|
| 151 |
+
{% endif %}
|
| 152 |
|
| 153 |
for (var kw0 = 0u; kw0 < k_words_total; kw0 = kw0 + KT_WORDS) {
|
| 154 |
let words = min(KT_WORDS, k_words_total - kw0);
|
|
|
|
| 172 |
let v = a[a_base4 + src_m * k_words_total + kw0 + ki];
|
| 173 |
{% endif %}
|
| 174 |
packed = pack_a(v);
|
| 175 |
+
{% if needsASum %}
|
| 176 |
atomicAdd(&a_row_sum[mi], sum4_a(v));
|
| 177 |
+
{% endif %}
|
| 178 |
}
|
| 179 |
a_tile[mi * KT_WORDS + ki] = packed;
|
| 180 |
}
|
| 181 |
workgroupBarrier();
|
| 182 |
|
| 183 |
if (n_valid) {
|
| 184 |
+
{% if tileM == 1 %}
|
| 185 |
+
// M=1 has only one output accumulator, so a scalar K loop forms a long
|
| 186 |
+
// dependent DP4A chain. Interleave several words while preserving the
|
| 187 |
+
// coalesced mapping of neighboring threads to neighboring B columns.
|
| 188 |
+
let unrolled_words = words - words % GEMV_K_UNROLL;
|
| 189 |
+
for (var kk = 0u; kk < unrolled_words; kk += GEMV_K_UNROLL) {
|
| 190 |
+
{% for u in range(GEMV_UNROLL) %}
|
| 191 |
+
let k4_{{ u }} = (kw0 + kk + {{ u }}u) * 4u;
|
| 192 |
+
let b_row_{{ u }} = b_base + k4_{{ u }} * params.N + col;
|
| 193 |
+
let b0_{{ u }} = b[b_row_{{ u }}];
|
| 194 |
+
let b1_{{ u }} = b[b_row_{{ u }} + params.N];
|
| 195 |
+
let b2_{{ u }} = b[b_row_{{ u }} + 2u * params.N];
|
| 196 |
+
let b3_{{ u }} = b[b_row_{{ u }} + 3u * params.N];
|
| 197 |
+
{% if needsBSum %}
|
| 198 |
+
sum_b{{ "" if u == 0 else "_" ~ u }} += sum4_b(b0_{{ u }}, b1_{{ u }}, b2_{{ u }}, b3_{{ u }});
|
| 199 |
+
{% endif %}
|
| 200 |
+
let bp_{{ u }} = pack_b(b0_{{ u }}, b1_{{ u }}, b2_{{ u }}, b3_{{ u }});
|
| 201 |
+
r0{{ "" if u == 0 else "_" ~ u }} += dot4_packed(a_tile[kk + {{ u }}u], bp_{{ u }});
|
| 202 |
+
{% endfor %}
|
| 203 |
+
}
|
| 204 |
+
for (var kk = unrolled_words; kk < words; kk++) {
|
| 205 |
+
let k4 = (kw0 + kk) * 4u;
|
| 206 |
+
let b_row = b_base + k4 * params.N + col;
|
| 207 |
+
let b0 = b[b_row];
|
| 208 |
+
let b1 = b[b_row + params.N];
|
| 209 |
+
let b2 = b[b_row + 2u * params.N];
|
| 210 |
+
let b3 = b[b_row + 3u * params.N];
|
| 211 |
+
{% if needsBSum %}
|
| 212 |
+
sum_b += sum4_b(b0, b1, b2, b3);
|
| 213 |
+
{% endif %}
|
| 214 |
+
let bp = pack_b(b0, b1, b2, b3);
|
| 215 |
+
r0 += dot4_packed(a_tile[kk], bp);
|
| 216 |
+
}
|
| 217 |
+
{% else %}
|
| 218 |
for (var kk = 0u; kk < words; kk = kk + 1u) {
|
| 219 |
let k4 = (kw0 + kk) * 4u;
|
| 220 |
let b_row = b_base + k4 * params.N + col;
|
|
|
|
| 222 |
let b1 = b[b_row + params.N];
|
| 223 |
let b2 = b[b_row + 2u * params.N];
|
| 224 |
let b3 = b[b_row + 3u * params.N];
|
| 225 |
+
{% if needsBSum %}
|
| 226 |
sum_b = sum_b + sum4_b(b0, b1, b2, b3);
|
| 227 |
+
{% endif %}
|
| 228 |
let bp = pack_b(b0, b1, b2, b3);
|
| 229 |
{% for m in range(tileM) %}
|
| 230 |
r{{ m }} = r{{ m }} + dot4_packed(a_tile[{{ m }}u * KT_WORDS + kk], bp);
|
| 231 |
{% endfor %}
|
| 232 |
}
|
| 233 |
+
{% endif %}
|
| 234 |
}
|
| 235 |
workgroupBarrier();
|
| 236 |
}
|
|
|
|
| 255 |
let a3: {{ aScalar }} = {{ "128u" if aUnsigned else "0" }};
|
| 256 |
let v = vec4<{{ aScalar }}>(a0, a1, a2, a3);
|
| 257 |
packed = pack_a(v);
|
| 258 |
+
{% if needsASum %}
|
| 259 |
atomicAdd(&a_row_sum[tid], sum4_a(v));
|
| 260 |
+
{% endif %}
|
| 261 |
}
|
| 262 |
a_tile[tid * KT_WORDS] = packed;
|
| 263 |
}
|
|
|
|
| 272 |
if (tail_lanes > 1u) { b1 = b[b_row + params.N]; }
|
| 273 |
if (tail_lanes > 2u) { b2 = b[b_row + 2u * params.N]; }
|
| 274 |
let b3: {{ bScalar }} = {{ "128u" if bUnsigned else "0" }};
|
| 275 |
+
{% if needsBSum %}
|
| 276 |
sum_b = sum_b + sum4_b(b0, b1, b2, b3);
|
| 277 |
+
{% endif %}
|
| 278 |
let bp = pack_b(b0, b1, b2, b3);
|
| 279 |
{% for m in range(tileM) %}
|
| 280 |
r{{ m }} = r{{ m }} + dot4_packed(a_tile[{{ m }}u * KT_WORDS], bp);
|
|
|
|
| 289 |
}
|
| 290 |
|
| 291 |
// Fold bias + zero-point corrections (exact in modular i32 arithmetic).
|
| 292 |
+
let cb: i32 = {{ "128" if bUnsigned else "0" }}{% if hasBZero %} - read_b_zero(){% endif %};
|
| 293 |
{% if not aZeroPerRow %}
|
| 294 |
+
let ca: i32 = {{ "128" if aUnsigned else "0" }}{% if hasAZero %} - read_a_zero(){% endif %};
|
| 295 |
let kcc: i32 = i32(params.K) * ca * cb;
|
| 296 |
{% endif %}
|
| 297 |
+
{% if needsBSum and tileM == 1 %}
|
| 298 |
+
let sum_b_total = sum_b{% for u in range(1, GEMV_UNROLL) %} + sum_b_{{ u }}{% endfor %};
|
| 299 |
+
{% endif %}
|
| 300 |
|
| 301 |
{% for m in range(tileM) %}
|
| 302 |
{
|
|
|
|
| 306 |
let ca: i32 = {{ "128" if aUnsigned else "0" }} - read_a_zero(mr);
|
| 307 |
let kcc: i32 = i32(params.K) * ca * cb;
|
| 308 |
{% endif %}
|
| 309 |
+
var acc = r{{ m }}{% if tileM == 1 %}{% for u in range(1, GEMV_UNROLL) %} + r0_{{ u }}{% endfor %}{% endif %};
|
| 310 |
+
{% if needsASum %}
|
| 311 |
acc = acc + cb * atomicLoad(&a_row_sum[{{ m }}u]);
|
| 312 |
+
{% endif %}
|
| 313 |
+
{% if needsBSum %}
|
| 314 |
+
acc = acc + ca * {% if tileM == 1 %}sum_b_total{% else %}sum_b{% endif %};
|
| 315 |
+
{% endif %}
|
| 316 |
acc = acc + kcc;
|
| 317 |
{% if hasBias %}
|
| 318 |
+
acc = acc + bias[{{ "col" if biasPerColumn is defined and biasPerColumn else "mr" }}];
|
| 319 |
{% endif %}
|
| 320 |
y[y_base + mr * params.N + col] = acc;
|
| 321 |
}
|
build/webgpu/test.json
CHANGED
|
The diff for this file is too large to render.
See raw diff
|
|
|