[vector] tighten spec around FP ops
Viswanathan, Sandhya
sandhya.viswanathan at intel.com
Tue Nov 5 01:07:00 UTC 2019
Hi Paul,
Your patch looks good to me.
I agree on your thoughts regarding not supporting ORDERED_ADD/MUL as performance is the primary focus/relevance of this API.
Best Regards,
Sandhya
-----Original Message-----
From: panama-dev <panama-dev-bounces at openjdk.java.net> On Behalf Of Paul Sandoz
Sent: Friday, November 01, 2019 11:20 AM
To: panama-dev at openjdk.java.net
Subject: [vector] tighten spec around FP ops
Hi,
Some tightening and consolidation of the floating point operations, especially associative ones:
http://cr.openjdk.java.net/~psandoz/panama/vector-fp-spec/webrev/ <http://cr.openjdk.java.net/~psandoz/panama/vector-fp-spec/webrev/>
--
There is still one issue dangling. By default the order applied for the associative operations ADD and MUL is deliberately undefined, allowing for optimizations.
1) This affects reproducibility, since the results may differ over versions or implementations of the platform.
2) This may also differ from a sequential application to the lane values from beginning to end. However, since vector operations will be commonly applied over arrays, the result from a sequential loop will also differ from that of a vectorized loop (grouping by the lane width).
I am not concerned about the latter case. I have some concern about the former case. Given the Vector API is about performance I don’t wanna change the default behavior of ADD and MUL.
One solution is to provide two further associative operations for floating point, ORDERED_ADD and ORDERED_MUL say. John’s extensible operator design make this easy to define, which also makes it easier to punt on this decision until later.
I am leaning towards punting give the performance focus of this API but could be persuaded otherwise..
Thoughts?
Paul.
More information about the panama-dev
mailing list