summaryrefslogtreecommitdiff
path: root/compiler/one-cmds/onecc.template.cfg
blob: c9968b4aee3b3627c7337e57fe1b142a51f46b6f (plain)
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
; set environment variables
[Environment]
ONECC_ENV="ONECC"

; To activate a step (or task),
; set True for the step in [onecc] section and fill options in the corresponding section
[onecc]
; neural network model to circle
one-import-tf=False
one-import-tflite=False
one-import-bcq=False
one-import-onnx=False
; circle to circle with optimization
one-optimize=False
; circle to circle with quantization
one-quantize=False
; partition circle
one-partition=False
; package circle and metadata into nnpackage
one-pack=False
; generate code for backend
one-codegen=False
; profile
one-profile=False
; infer
one-infer=False
; group option
; multiple group options are allowed
include=O1
# include=O1 O2 OMY_OPT

[one-import-tf]
# mandatory
; pb file
input_path=
; circle file
output_path=
# optional
; v1 or v2
converter_version=v2
; graph_def(default), saved_model or keras_model
model_format=graph_def
# optional but mandatory for model_format=graph_def
; input tensor names of the input arrays, comma-separated
input_arrays=
; output tensor names of the input arrays, comma-separated
output_arrays=
; input shapes corresponding to --input_arrays, colon-separated.(ex:1,4,4,3:1,20,20,3)
input_shapes=

[one-import-tflite]
# mandatory
; tflite file
input_path=
; circle file
output_path=

[one-import-bcq]
# mandatory
; bcq file
input_path=
; circle file
output_path=
# optional
; v1 or v2
converter_version=v2
; graph_def(default), saved_model or keras_model
model_format=graph_def
# optional but mandatory for model_format=graph_def
; input tensor names of the input arrays, comma-separated
input_arrays=
; output tensor names of the input arrays, comma-separated
output_arrays=
; input shapes corresponding to --input_arrays, colon-separated.(ex:1,4,4,3:1,20,20,3)
input_shapes=

[one-import-onnx]
# mandatory
; onnx file
input_path=
; circle file
output_path=
# optional
; True or False
unroll_rnn=
; True or False
unroll_lstm=

[one-optimize]
# mandatory
; circle file
input_path=
; circle file
output_path=
# //TODO: Add available options

[one-quantize]
# mandatory
; circle file
input_path=
; circle file
output_path=
# optional arguments for quantization
; input data file (if not given, random data will be used for calibration)
input_data=
; h5/hdf5(default), list/filelist, or dir/directory
input_data_format=
; dtype of quantized model (uint8(default), int16)
quantized_dtype=
; granularity of quantization (layer(default), channel)
granularity=
; dtype of model's input (uint8, int16, float32). Same with quantized_dtype by default.
input_type=
; dtype of model's output (uint8, int16, float32). Same with quantized_dtype by default.
output_type=

[one-partition]
# mandatory
; partition file which provides backend to assign
part_file=
; circle file
input_file=
# //TODO: Add available options

[one-pack]
# mandatory
; input path
input_path=
; output path
output_path=
# //TODO: Add available options

[one-codegen]
# mandatory
; backend name
backend=
; commands for each backend
command=

[one-profile]
# mandatory
; backend name
backend=
# //TODO: Add available options

[one-infer]
# mandatory (mutually exclusive)
; backend name
backend=
; driver name
driver=
# //TODO: Add available options