google / highway

Performance-portable, length-agnostic SIMD with runtime dispatch
Apache License 2.0
3.96k stars 307 forks source link

Fix/improve RVV bf16 convert #2174

Closed copybara-service[bot] closed 1 month ago

copybara-service[bot] commented 1 month ago

Fix/improve RVV bf16 convert

Use the native vxrm RNE rounding mode where supported. GCC 13 defaults to RNU, which rounds 7F7F[8..0] to 7F80. Note that QEMU also has an issue, see https://www.mail-archive.com/gcc-patches@gcc.gnu.org/msg309080.html

Also add new test cases.