ONE
ONE copied to clipboard
Implement one-init
Let's implement one-init. #9369 describes analysis work for this implementation.
- [x] write a draft (#9421)
- [x] test if cfg file from the draft work OK
- If cfg file be used to compile models (except some unusual models), make PRs and make one-init to be included into the release.
- [ ] Add more PRs incrementally by enhancing one-init with some exceptional models
Note:
- With cfg file fron one-init, onecc should produce backend code after codegen.
- "backend code after codegen should be optimized" would be convered in next step.
- why? some param cannot be automatically entered (e.g., quantization input data path)
- for the first step, we will put some comment into cfg file that, e.g., entering input data path would increase accuracy.
@hyunsik-yoon Could you please point out the issues to get background about one-init
?
As I roughly understand, one-init
is:
- created for one-vscode
- related to
onecc
- not related to
onert
IIUC, people may be confused what for one-init
.
- Is it the first mandatory step to build or use something in one?
- Is it required to run before run
onert
?
Maybe onecc-init
?
@glistening, Thanks for the good questions. It's kinda hard to track the history. 😢
Could you please point out the issues to get background about one-init?
- one-init is tool in ONE project (not one-vscode). Of course, one-init can be used by other projects such as one-vscode and one-vscode will have plan to use one-init.
- what is one-init?
- To compile a given model, some people need to spend time to create the first cfg file. Normally people who does not understand one tools, they have difficulty in creating the first cfg file.
- To make this easier, one-init generates an initial cfg file for a model.
- Is it the first mandatory step to build or use something in one?
- Is it required to run before run
onert
?
It is an optional step to create initial cfg easier. People who can create a cfg file for a given model by themselves don't need to use one-init.
Maybe
onecc-init
?
Like other onecc tools, IMHO we could follow the naming convention in ONE project:
-
one-init
(cmd name)- there are many other tools with name
one-...
. ($ ls /usr/share/one/bin/one-*
)
- there are many other tools with name
-
one-init
also could be invoked withonecc init ...
like others inEXAMPLES
section in$ man onecc
I added two more lines in action list of https://github.com/Samsung/ONE/issues/9450#issue-1307418648:
- If cfg file be used to compile models (except some unusual models), make PRs and make one-init to be included into the release.
- [ ] Add more PRs incrementally by enhancing one-init with some exceptional models
Like other onecc tools, IMHO we could follow the naming convention in ONE project:
one-init
(cmd name)
- there are many other tools with name
one-...
. ($ ls /usr/share/one/bin/one-*
)
one-init
also could be invoked withonecc init ...
like others inEXAMPLES
section in$ man onecc
I don't think it is the same case. Other one-...
tools have somewhat specific action name after one-
. For example, one-quantize
, one-import-tf
, one-infer
, ... But one-init
is broad at least for me as I mentioned above. It is hard to imagine what initialization would be done by the name of one-init
. In addition, if it just creates a default configuration, why users need to execute this tool explicitly? It may be created automatically or use the default values internally without creating configuration.
Anyway, if others already agree about one-init
. Please just think my comment as some people may think in this way.
@glistening FYI this name was originated from https://github.com/Samsung/ONE/issues/9153
In addition, if it just creates a default configuration, why users need to execute this tool explicitly? It may be created automatically or use the default values internally without creating configuration.
one-init tries to select right options for model type (tflite, onnx, etc) and backend codegen type to generate initial cfg file. (https://github.com/Samsung/ONE/issues/9369, https://github.com/Samsung/ONE/issues/9313)
@glistening FYI this name was originated from #9153
Thank you for reference. It is the issue I've asked above. Now I can see:
- several suggested names from #9153 (
onecc-init
,one-config-init
,one-new
,one-init
, ... ) - suggested usage like https://github.com/Samsung/ONE/issues/9153#issuecomment-1149549170
I tested models with generated cfg files. (internal one vscode repo issue 93) Let me start make commits for PR.