xsimd icon indicating copy to clipboard operation
xsimd copied to clipboard

AArch64 Neon float16x4

Open dmikushin opened this issue 3 years ago • 2 comments

As I understand, currently xsimd does not support vectors of 16-bit floats. Their support has been recently added by AVX512-FP16, but I'm particularly interested in float16x4 of ARM Neon. What would be the best way to implement it, I appreciate your recommendations!

dmikushin avatar Aug 07 '22 21:08 dmikushin

Let get the ball rolling. And please correct me when I'm wrong / inaccurante.

From my (quick) bibliography, _Float16 is the defacto standard for generic half floats, so we could use that as batch parametric type. It's supported on arm and AVX512-FP16. Looks like SVE also has (some) support for it.

Most of our math routines are generic, so once we implement the trivial operations (arithmetic etc) we should already have part of the job done.

Looks like there's not much we can do for avx2 and before.

Is this correct?

serge-sans-paille avatar Oct 01 '22 16:10 serge-sans-paille

Alternatively, we could provide xsimd::float16 as a scalar type that maps to the appropriate type when available.

serge-sans-paille avatar Oct 01 '22 16:10 serge-sans-paille