File tree Expand file tree Collapse file tree 2 files changed +25
-5
lines changed
Expand file tree Collapse file tree 2 files changed +25
-5
lines changed Original file line number Diff line number Diff line change @@ -124,13 +124,13 @@ pytest -c /dev/null -v -n auto backends/arm/test --arm_run_corstoneFVP
124124
125125## Passes
126126
127- With the default passes in the Arm Ethos-U backend, assuming the model lowers fully to the
128- Ethos-U, the exported program is composed of a Quantize node, Ethos-U custom delegate
127+ With the default passes in the Arm Ethos-U backend, assuming the model lowers fully to the
128+ Ethos-U, the exported program is composed of a Quantize node, Ethos-U custom delegate
129129and a Dequantize node. In some circumstances, you may want to feed quantized input to the Neural
130- Network straight away, e.g. if you have a camera sensor outputting (u)int8 data and keep all the
131- arithmetic of the application in the int8 domain. For these cases, you can apply the
130+ Network straight away, e.g. if you have a camera sensor outputting (u)int8 data and keep all the
131+ arithmetic of the application in the int8 domain. For these cases, you can apply the
132132` exir/passes/quantize_io_pass.py ` . See the unit test in `executorch/backends/arm/
133- test/passes/test_ioquantization_pass.py`for an example how to feed quantized inputs and
133+ test/passes/test_ioquantization_pass.py`for an example how to feed quantized inputs and
134134obtain quantized outputs.
135135
136136
Original file line number Diff line number Diff line change @@ -40,7 +40,27 @@ def test_ioquantisation_pass(self):
4040 .quantize ()
4141 .export ()
4242 .to_edge ()
43+ .check_count (
44+ {
45+ "executorch_exir_dialects_edge__ops_quantized_decomposed_quantize_per_tensor_default" : 3
46+ }
47+ )
48+ .check_count (
49+ {
50+ "executorch_exir_dialects_edge__ops_quantized_decomposed_dequantize_per_tensor_default" : 3
51+ }
52+ )
4353 .partition ()
54+ .check_count (
55+ {
56+ "executorch_exir_dialects_edge__ops_quantized_decomposed_quantize_per_tensor_default" : 2
57+ }
58+ )
59+ .check_count (
60+ {
61+ "executorch_exir_dialects_edge__ops_quantized_decomposed_dequantize_per_tensor_default" : 1
62+ }
63+ )
4464 )
4565 edge = tester .get_artifact ()
4666 edge .transform (
You can’t perform that action at this time.
0 commit comments