This is the inital patch for RISC-V vector extension (RVV) dialect. This patch include:
- RVV Dialect Definition
- RVV Scalable Vector Type
- RVV Operations
- RVV Intrinsic Operations
- Translation from RVV Dialect to LLVM Dialect
Differential D108536
[mlir][RISCVV][RFC] Initial RISCVV Dialect zhanghb97 on Aug 23 2021, 3:05 AM. Authored by
Details This is the inital patch for RISC-V vector extension (RVV) dialect. This patch include:
Diff Detail
Event TimelineComment Actions some initial comments, we are also having a discussion at discourse in the RFC thread
Comment Actions nit on the naming, rvv feels a bit too general. I'd rather go with a longer name that spells out riscv: riscvv or something related.
Comment Actions
Comment Actions Some communities tend to use RVV as the name. For example, the rvv-intrinsic-doc and OpenCV wide universal intrinsic definition: intrin_rvv.hpp. So I also use the RVV on the MLIR side at the very beginning. If the "rvv/RVV" is too general, and to be consistent with MLIR naming convention (arm_sve/ArmSVE, x86vector/X86Vector, etc.), how about using :
What do you think about these names?
Comment Actions As for the integration test, I currently encounter some problems, and I will continue to find some solutions. At the same time, I will try to move the scalable vector type into the vector dialect in the next step. And for the names, if the "rvv" is to general, we can use the following names:
This needs further confirmation.
Comment Actions
Comment Actions For the next step, I will try to give better semantics to the type of RVV:
Comment Actions
Comment Actions Have you made more progress on this? I realize this is a bit of a hazzle, but leaving it as a TODO has a very high risk of not being done at all... :-( Comment Actions I also realize the risk of not having the integration test. If LLVM IR intrinsics are changed (e.g. add a argument like this patch), the unit tests on MLIR will not be affected, but there will be problems when translating to LLVM IR. I am trying to figure out why the cross-compiled lli and mlir-cpu-runner fail to identify the target with the QEMU, And I will also use a RISC-V machine to have a try. Comment Actions
WIP: integration test Comment Actions
Comment Actions
My teammate has sent some patches hoping to support JIT for the RISC-V side.
For more details, please see his patches:
Comment Actions
Comment Actions I provide an environment setup document to show how to build the toolchain and perform the integration tests. |