How to fill QNN_DATATYPE_UFIXED_POINT_16 type array correctly

#5
by daekyoung-jung - opened

Hi guys,

I was a bit confused when I tried to use this model.

I was implementing a cpp-based Android app to run stable diffusion on a device with QNN library.

I refered to https://docs.qualcomm.com/bundle/publicresource/topics/80-64748-1/model_execution_android.html to get help.

In the tutorial, time embedding is first written to a file and the file path is given as "qnn-net-run" command's argument.

However, in my program, the time embedding is in the memory and it's type is float, but type of the tensor which is named as "input_2" of the "unet" graph is "QNN_DATATYPE_UFIXED_POINT_16".

So my question is how can I copy correctly from float array to "QNN_DATATYPE_UFIXED_POINT_16" type array?

I searched for any information on QNN's official documenation page, but I had no success so far.

Can anyone please help me have a helping hand?

This comment has been hidden

Sign up or log in to comment