Open pyl3000 opened 3 weeks ago
For some background, see these guides:
The sequence I think you are asking about is:
iree-import-onnx ...
converts from a .onnx
file to .mlir
iree-compile --iree-hal-target-backends=llvm-cpu ...
compiles from .mlir
to a .vmfb
file (to users, this is a black box process)iree-compile
with --mlir-print-ir-after-all
, or --dump-compilation-phases-to
, --iree-hal-dump-executable-files-to
, or any of the other debugging flags lets you peek into that black box and see what the compiler is doing step by step
Thank you, if we have an LLVM IR (.mlir file), how can we convert it into Risc-V executable binary code?
Our RISC-V docs are:
When you compile with flags like these:
iree-compile \
--iree-hal-target-backends=llvm-cpu \
--iree-llvmcpu-target-triple=riscv64 \
--iree-llvmcpu-target-abi=lp64d \
--iree-llvmcpu-target-cpu-features="+m,+a,+f,+d,+zvl512b,+v" \
--riscv-v-fixed-length-vector-lmul-max=8 \
iree_input.mlir -o mobilenet_cpu.vmfb
the llvm-cpu backend uses LLVM to compile the LLVM IR to executable binary code for the riscv64 target
I couldn't find the corresponding conversion method in
iree-opt
andiree-translate
tools.