forked from charlesxzb/model-zoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mlir.config.yaml
56 lines (52 loc) · 1.76 KB
/
mlir.config.yaml
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
46
47
48
49
50
51
52
53
54
55
56
---
name: TSN
gops: [8.2]
shapes:
- [1, 1, 3, 224, 224]
BM1684X:
mlir_transform:
model_transform.py
--model_name $(name)
--model_def $(home)/tsn.onnx
--test_input $(home)/data/tsn_in_f32.npz
--input_shapes [$(shape_param)]
--tolerance 0.99,0.99
--test_result $(name)_top_outputs.npz
--mlir $(workdir)/transformed.mlir
mlir_calibration:
run_calibration.py $(workdir)/transformed.mlir
--dataset $(home)/data
--input_num 1
-o $(workdir)/$(name).calitable
deploy:
- model_deploy.py --mlir $(workdir)/transformed.mlir
--quantize F32
--chip bm1684x
--test_input $(workdir)/$(name)_in_f32.npz
--test_reference $(name)_top_outputs.npz
--tolerance 0.99,0.99
--model $(workdir)/$(name)_bm1684x_f32.bmodel
- model_deploy.py --mlir $(workdir)/transformed.mlir
--quantize F16
--chip bm1684x
--test_input $(workdir)/$(name)_in_f32.npz
--test_reference $(name)_top_outputs.npz
--tolerance 0.99,0.99
--model $(workdir)/$(name)_bm1684x_f16.bmodel
- model_deploy.py --mlir $(workdir)/transformed.mlir
--quantize BF16
--chip bm1684x
--test_input $(workdir)/$(name)_in_f32.npz
--test_reference $(name)_top_outputs.npz
--tolerance 0.99,0.99
--model $(workdir)/$(name)_bm1684x_bf16.bmodel
- model_deploy.py --mlir $(workdir)/transformed.mlir
--quantize INT8
--calibration_table $(workdir)/$(name).calitable
--chip bm1684x
--test_input $(workdir)/$(name)_in_f32.npz
--test_reference $(name)_top_outputs.npz
--tolerance 0.95,0.85
--quant_input
--quant_output
--model $(workdir)/$(name)_bm1684x_int8_sym.bmodel