Commit 51befee
Arm backend: Enable test_llama_tosa_BI and related fixes (pytorch#10681)
First problem solved by adding quantize of scalar_tensor: The where.self
operator got a scalar_tensor input which was not quantized. This
happened since the where.self quantization annotator uses the parent
specs, which in this case where non-existing. Adding the quantization of
scalar_tensor sorts this out.
Secondly when quantizing scalar_tensor the following assert triggers:
expecting kwargs for aten op IR to be empty
Hence setting scalar_tensor kwargs to {}.
Finally trying to quantize -inf fails for scalar_tensor nodes fails Fix
it by adding the pass from qnn backend to replace -inf/inf. Hence adding
new pass ReplaceInfValues.
Co-authored-by: Per Åstrand <[email protected]>1 parent 6da46fb commit 51befee
File tree
5 files changed
+54
-3
lines changed- backends/arm
- _passes
- quantizer
- test/models
5 files changed
+54
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| 60 | + | |
60 | 61 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
| |||
216 | 217 | | |
217 | 218 | | |
218 | 219 | | |
| 220 | + | |
219 | 221 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
411 | 411 | | |
412 | 412 | | |
413 | 413 | | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
414 | 417 | | |
415 | 418 | | |
416 | 419 | | |
| |||
458 | 461 | | |
459 | 462 | | |
460 | 463 | | |
| 464 | + | |
461 | 465 | | |
462 | 466 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | | - | |
109 | 108 | | |
110 | 109 | | |
111 | 110 | | |
| |||
126 | 125 | | |
127 | 126 | | |
128 | 127 | | |
129 | | - | |
130 | | - | |
| 128 | + | |
| 129 | + | |
131 | 130 | | |
132 | 131 | | |
0 commit comments