RFR: 8320500: [vectorapi] RISC-V: Optimize vector math operations with SLEEF [v6]
Hamlin Li
mli at openjdk.org
Thu Sep 26 11:53:14 UTC 2024
On Thu, 26 Sep 2024 07:54:32 GMT, Hamlin Li <mli at openjdk.org> wrote:
>> Just a bit worried about the fact that manipunating CSR could be very costly on RISC-V. Another choice would be adding an assertion about FP rounding mode expecting RNE when returning back from the SLEEF routine. I also checked floating-point intrinsics with `_rm` suffix in the function name in SLEEF src code and only witnessed use of `__RISCV_FRM_RNE`. I didn't see uses of other rounding modes as specified by the rvv-intrinsic-spec [1].
>>
>> [1] https://github.com/riscv-non-isa/rvv-intrinsic-doc/blob/main/doc/rvv-intrinsic-spec.adoc
>
> Sounds like a reasonable solution!
> Anyone has other thoughts please kindly let me know.
added some code to check `frm` after sleef calls.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21083#discussion_r1776903349
More information about the build-dev
mailing list