Open HaolinChen opened 1 year ago
I have solved the zero cycle problem. It truns out that I didn't start timer.
#ifdef PERF
printf("Start timer\n");
gap_cl_starttimer();
gap_cl_resethwtimer();
#endif
But I still get wrong results. NNTOOL can output the right featuremap, but the output of Autotiler is not right. It's very strange. I've used the newest SDK, but the problem still exits.
HI Haolin, you mean that the quantized execution in NNTool is correct but in the real target (the code generated by the autotiler that runs on gvsoc/board) doesn't match with NNTool?
If it is the case please check you are providing the input data in the correct format in the real target, i.e. the quantized version of the data. While in NNTool you need to run on float input data, in the real target the model is fully quantized and requires data in the quantized version. You can check the quantized range/scaling factors of the inputs with G.qshow()
.
I successfully quantized my onnx model with nntool 8 bit quantization and run it on GVSOC.
However, I get wrong featuremap output. Besides, the cycles are also strange.
They are all zeros. I want to know how can I solve this problem. Is it caused by Makefile configuration or nntool script? Or it's just autotiler or gvsoc bug. Actually, in nntool, I can get the right model output even the model is quantized.