Vector API "Straw Man" Boxed/Unboxed Vector Instantiation

John Rose john.r.rose at oracle.com
Mon Mar 28 19:58:29 UTC 2016


On Mar 26, 2016, at 4:45 PM, panama <panama at zeus.net.au> wrote:
> 
> How can spir-v be leveraged? Could the vector api utilise it? Could hotspot support spir-v, in case it wasn't supported by underlying hardware?

The library engines behind Vector could maybe use something like SPIR.  (And the IR might leak through in interesting ways to some users.)

This relates to my comment that we need a way for the Vector runtime to "crack" the lambdas passed to HOF API points like Vector.reduce.  If we had the equivalent of C# expression trees, we could treat chains of vector ops as queries to be optimized, when executing a terminal operation (such as Vector.intoArray or hypothetical Vector.collect).  A vector expression could be cooked into some kind of IR, and then instruction-selected into a AVX code.

To use SPIR (or maybe even the above approach), we would need a more explicit user-cotrolled boundary between the "host" and "offload" parts of the computation.  Making an automagic partition between the two, from a common bucket of Java execution, is currently science fiction.

— John


More information about the panama-dev mailing list