-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[onert/odc] Draft for odc: hidden switching mechanism. fcircle-qcircle step #13530
base: master
Are you sure you want to change the base?
Conversation
fe5bf20
to
967a66c
Compare
I don't check all your implementation yet, but here is my comment
|
967a66c
to
e5e7230
Compare
@hseok-oh Thank you for pointing out your implementation of quantization and dequantization of buffers. I removed this functional duplication and moved |
(optional) I think it would be good to use a different function name to make it easier for the user to understand, but I am not sure about the appropriate function name.. :( It's a long name, but how about |
e5e7230
to
da388c1
Compare
@jyoungyun It's a good idea, thank you. I renamed the function name to |
7140f5b
to
992deca
Compare
@hseok-oh @jyoungyun Could you advise me, please, how can I add a test of the compilation part? |
IMO, responsibility of saving minmax recording count threshold and checking recording count should have in quantizer, not minmax recorder. So API should query to quantizer that it is ready to quantize, and quantizer should check recording count from file. In this point of view, if quantizer replies it is ready, API will change exec config to stop recording and request quantizer to actually quantize. Additionally, hdf5 minmax dumper is not used now, and that will be removed. |
ad10e22
to
4d0ae5f
Compare
I moved checking the readiness for quantization and minmax recording threshold to |
4d0ae5f
to
28ed907
Compare
Negative test was added |
…circle-qcircle step was implemented with compilation Conv2D_000.circle is used as model for test (it was added just for this draft verification) This draft contains auto compilation, which is executed in `nnfw_run_auto_compilation` function. - `nnfw_run_auto_compilation` function was added. - QuantizerManager, quantizer and MinMaxReader were changes for set and minmax threshold and cheking readiness for quantization. Function for removing minmax file was added. - OdcInfo class for storaging actual state of the odc was added. - for compilation step it uses "session::codegen" function After model quantization, the removing minmax file step was added. After first loading quantized model the following sequence was implemented: - save the inputs and outputs buffers of the initial fcricle model - attempt to compile of the quantized model and load compiled model, if it fails, try to load the quantized model - recover inputs and outputs after that - do inference of the compiled or quantized model Positive and negative tests were added ONE-DCO-1.0-Signed-off-by: Evgenii Maltsev e.maltsev@samsung.com
28ed907
to
fe7d8ce
Compare
@hseok-oh PTAL |
This is draft for odc: hidden switching mechanism. fcircle-qcircle step was implemented.
Conv2D_000.circle is used as model for test (it was added just for this draft verification)
Size of the model: 556B
This draft contains auto compilation (
odc: hidden switching mechanism
) , which is executed innnfw_run_with_auto_compilation
function.nnfw_run_with_auto_compilation
function was added.After model quantization, the removing minmax file step was added.
After first loading quantized model the following sequence was implemented:
after that do inference of the quantized model
For running test of this draft:
Time of the test execution: 11 ms
Peak memory footprint of the test: 4,939 Kb
ONE-DCO-1.0-Signed-off-by: Evgenii Maltsev e.maltsev@samsung.com