Do we need to manually extend ITensor for floating point support?
I'm trying to integrate ComputeLibrary into my Caffe model. The first thing I've come up is to replace Caffe's gemm function with ComputeLibrary's gemm function.
I've found out that there's a NEGEMM class for floating point matrix multiplication. However, the input parameter refers to an ITensor class which seems to require the underlying data type to be uint8_t.

Do we need to implement another Tensor class for floating point support? Or is there something wrong with my understanding that I can bypass this problem by applying other approaches?
ps: Does the "I" in "ITensor" indicate it is a Tensor for integer matrix?
There is no need to create a new tensor class, F32 is supported by the class Tensor: https://github.com/ARM-software/ComputeLibrary/blob/master/arm_compute/runtime/Tensor.h
You'll need to cast the pointer to float as done in: https://github.com/ARM-software/ComputeLibrary/blob/master/src/core/NEON/kernels/NEGEMMMatrixMultiplyKernel.cpp#L97
The I in ITensor stands for 'Interface'.
Thank you very much. It works out smoothly now.
We decided to always return "uint8_t*" to make it easier to perform pointer arithmetic:
float *ptr = input.buffer() + input.info()->offset_element_in_bytes( Coordinates(x, y) );
The other options were to return "void*" but then you need to cast your pointer to a type before you can calculate an offset. Or we could have used a template but then it means the entire library would only be templates as some kernels / functions accept different types of Tensors.
Also in both of these cases it meant the "offsets" should be returned in "element_size" rather than in "bytes" which is not always possible: for example the "offset_first_element" doesn't have to be a multiple of "element_size", it could be anything.
That's why in the end we stuck to "uint8_t*".
Hope this helps you understand.
It's really helpful. The idea becomes clear to me.