Although Sentis does not support float16 as of yet. There may be times where you want to convert an array of float16’s to float32 or vice versa. (Perhaps you have some input data downloaded from Hugging face in float16 format. Or you want to output results to some compute shader on the GPU.)
It would be nice if there was a way to convert arrays of float16 (Halfs) to float32’s and vice versa. Perhaps implemented as a compute shader or using Burst. The built in Mathf.FloatToHalf is not suitable for this.
I have used Mathf.FloatToHalf when using Onnx Runtime and found it very slow so I ended up creating a small neural network on the GPU that just converted float arrays to half arrays.
dot net 7 has the Half type: Half Struct (System) | Microsoft Learn but not sure if you can convert arrays with it.
Sentis must be using something like this when you drag a float16 onnx file to the asset folder it gets converted to float32. So maybe there is this function already which can be exposed?