[REVIEW ONLY 0/4] UNRATIFIED RISC-V: Add support for BFloat16 extensions
Tsukasa OI
research_trasio@irq.a4lg.com
Thu Aug 3 00:04:52 GMT 2023
Hello,
This patch set implements three extensions in the RISC-V BF16 Extensions
specification:
<https://github.com/riscv/riscv-bfloat16/commit/5578e34e15a44e9ad13246072a29f51274b4d999>
Each patch implements following extensions one by one (PATCH 1-3/4).
1. 'Zfbfmin' (scalar BF16 conversion extension)
2. 'Zvfbfmin' (vector BF16 narrowing/widening conversion-only extension)
3. 'Zvfbfwma' (vector BF16 widening multiply-accumlate extension)
The extension versions are set to "0.8" as in the documentation
(not final "1.0").
Although it's small, it covers some of important machine learning workloads
(especially 'Zvfbfwma' extension). I hope this patch set helps testing
this draft extension on the simulator.
PATCH 4/4 is a tentative support of an assembler directive: ".bfloat16".
Although not included in the RISC-V Assembly Programmer's Manual, the final
assembler directive will be likely ".bfloat16" (like x86 and AArch64).
Test cases are ported from AArch64.
Thanks,
Tsukasa
Tsukasa OI (4):
UNRATIFIED RISC-V: Add 'Zfbfmin' extension
UNRATIFIED RISC-V: Add 'Zvfbfmin' extension
UNRATIFIED RISC-V: Add 'Zvfbfwma' extension
RISC-V: Tentative ".bfloat16" assembly support
bfd/elfxx-riscv.c | 24 ++++++++++++++++++++++--
gas/config/tc-riscv.c | 3 ++-
gas/testsuite/gas/riscv/bfloat16-be.d | 10 ++++++++++
gas/testsuite/gas/riscv/bfloat16-le.d | 10 ++++++++++
gas/testsuite/gas/riscv/bfloat16.s | 19 +++++++++++++++++++
gas/testsuite/gas/riscv/zfbfmin.d | 15 +++++++++++++++
gas/testsuite/gas/riscv/zfbfmin.s | 10 ++++++++++
gas/testsuite/gas/riscv/zvfbfmin.d | 12 ++++++++++++
gas/testsuite/gas/riscv/zvfbfmin.s | 5 +++++
gas/testsuite/gas/riscv/zvfbfwma.d | 12 ++++++++++++
gas/testsuite/gas/riscv/zvfbfwma.s | 5 +++++
include/opcode/riscv-opc.h | 24 ++++++++++++++++++++++++
include/opcode/riscv.h | 3 +++
opcodes/riscv-opc.c | 13 +++++++++++++
14 files changed, 162 insertions(+), 3 deletions(-)
create mode 100644 gas/testsuite/gas/riscv/bfloat16-be.d
create mode 100644 gas/testsuite/gas/riscv/bfloat16-le.d
create mode 100644 gas/testsuite/gas/riscv/bfloat16.s
create mode 100644 gas/testsuite/gas/riscv/zfbfmin.d
create mode 100644 gas/testsuite/gas/riscv/zfbfmin.s
create mode 100644 gas/testsuite/gas/riscv/zvfbfmin.d
create mode 100644 gas/testsuite/gas/riscv/zvfbfmin.s
create mode 100644 gas/testsuite/gas/riscv/zvfbfwma.d
create mode 100644 gas/testsuite/gas/riscv/zvfbfwma.s
base-commit: 4b177a76d5b759ba631568fb69e8750e99b43647
--
2.41.0
More information about the Binutils
mailing list