*/ How do I convert the fp32 models to fp16 , to be able to take performance advantage on GPU .
Does "snpe-dlc-quantize" tool support this conversion ? or is one expected to train the model in fp16 precision , convert to dlc format and then run on GPU target ?
Thanks
Hi manasa.kankansla,
snpe-dlc-quantize tool is for DSP 8-bit quantization.
To utilize fp16 on GPU, you don't need any pre-quantization. Just use fp32 model and float16 option. Then SNPE would quantize the fp32 model into fp16 in the initialization step automatically.
Thanks,
Jihoon
can you point me to the java API that will let me use the fp16 option.
I found out following pages in reference guide. Those may work.
setRuntimeOrder() API
https://developer.qualcomm.com/docs/snpe/classcom_1_1qualcomm_1_1qti_1_1...
GPU_FLOAT16 runtime
https://developer.qualcomm.com/docs/snpe/enumcom_1_1qualcomm_1_1qti_1_1s...
Thanks,
Jihoon
Hello Jihoon ,
Thanks for taking time to respond to my question.
I followed your suggestion and tried setting the RuntimeOption , below it the code
But the Runtimes available in SNPE 1.15.0 doesn't contain any GPU_FLOAT16
so if I try to access GPU_FLOAT16 at index 3 as per the SNPE documentation , I get
java.lang.ArrayIndexOutOfBoundsException: length=3; index=3.
Thanks ,
Manasa
there is a lot of tool and sub tools available to convert FP32 to FP16, with the free tutorial and activation key, here, Google Support you can get the lsit of the free tools, browse it, whatever you want to choose to conversion.
Hi manasa,
It seems JAVA API is not updated to support GPU_FLOAT16. You'd better to use C++ API or wait for next release.
Thanks,
Jihoon
Hi jihoonk, does the SNPE supoort load fp16 model? (e.g. I trained a 16fp model with tensorflow)
and could you share some information about the performance/speed when SNPE runs in fp16 mode, thanks
Hi shu.wang.v,
I'm afraid I can't answer the TensorFlow fp16 model question as I don't have experience to do that.
In my experience, fp16 mode has 10~20% of speed-up comparing fp32 mode.
Thanks,
Jihoon
Hi Jihoon,
Thanks for your quick response, then does SNPE support load tensorflow fp16 model? I know it supports load fp32 model and runs in fp16 mode.