Commit 62bd46e
Arm backend: Add evaluate_model.py (pytorch#18199)
Arm backend: Add evaluate_model.py
This patch reimplements the evaluation feature that used to be in
aot_arm_compiler.py while introducing a few improvements. The program is
evaluate_model.py and it imports functions from aot_arm_compiler.py to
compile a model in a similar manner, but runs its own code that is
focused on evaluating a model using the evaluators classes in
backends/arm/util/arm_model_evaluator.py.
The following is supported in evaluate_model.py:
- TOSA reference models (INT, FP).
- Evaluating a model that is quantized and/or lowered.
I.e., it is possible to evaluate a model that is quantized but not
lowered, lowered but not quantized, or both at the same time.
- The program can cast the model with the --dtype flag to evaluate a
model in e.g., bf16 or fp16 format.
Also add tests that exercise evaluate_model.py with different command
line arguments.1 parent e08ef53 commit 62bd46e
4 files changed
Lines changed: 469 additions & 1 deletion
File tree
- backends/arm
- scripts
- test
- misc
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
691 | 691 | | |
692 | 692 | | |
693 | 693 | | |
694 | | - | |
| 694 | + | |
695 | 695 | | |
696 | 696 | | |
697 | 697 | | |
| |||
0 commit comments