Draft JEP: Vector API

Ningsheng Jian ningsheng.jian at linaro.org
Fri Apr 13 02:09:53 UTC 2018


Hi Vladimir,

On 12 April 2018 at 10:49, Vladimir Ivanov <vladimir.x.ivanov at oracle.com> wrote:
>
>
> From API perspective, irrespective of actual implementation on ISA level,
> vectors are strongly typed by their shape (element type + length). There's
> no way to perform an operation on vectors of incompatible shapes: e.g., it's
> illegal to add 128-bit vector of ints to 256-bit vector of ints.
>
> The main motivation for class-per-shape implementation now is to help
> JIT-compiler to disambiguate (devirtualize & inline) vector operation
> implementation down to intrinsifiable primitives: in order to get decent
> code generated the whole vector kernel should be fully inlined down to
> concrete intrinsic calls (methods on VectorIntrinsic).
>
> If there's a way to move vector shape (or part of it) from separate class
> into instance variables on vectors w/o sacrificing code optimizability, that
> would be a welcome enhancement simplifying the implementation on both x86 &
> ARM.
>
OK, I can see the limitation and trick.

> Regarding dedicated Agnostic shape, as Sandhya & Paul already mentioned, the
> API already supports shape-agnostic vector programming approach by querying
> the most optimal shape at runtime and using it to construct vector kernels.
>
Thanks, I've got the answers and thoughts about this from Paul's emails.

Thanks,
Ningsheng


More information about the jdk-dev mailing list