We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Does Mali suuport 8bit int vector operation to workaround overflow issue like scalar operation?
Such as..
I tested with G72.
In scalar operation,
--------------------------------
uchar a = 255;
uchar b = 255;
Int c = a + b;
It results 510 in c.
But in case of vector,
uchar4 a={255,255,255,255}
uchar4 b={255,255,255,255}
int4 c = a + b;
It prints wrong answer..
So my question is
1. Scalar operation uses general purpose register and it is 32bit register. That's why scalar operation results correctly. Am i right?
2. Why does Vector operation not support auto cast like scalar operation ? Does it not support general purpose register like in scalar operation?
3. I heard G52 and it supports int8 operation. Does it mean G52 supports 8bit vector register which resolve second case above?
To answer your third question about Mali-G52, then it adds a dedicated vector instruction for 8-bit integer dot product which effectively provides a cross-lane FMA for machine learning kernels. The instruction behaves as if all of the multiplication intermediates are 32-bits wide, so there is no clipping of the result.
See the following OpenCL extension for usage information in OpenCL kernels:
https://www.khronos.org/registry/OpenCL/extensions/arm/cl_arm_integer_dot_product.txt
Cheers, Pete