TODO: End Users should not build from scratch. But we still need to compile our customized pass, the one that lowers linalg.matmul to hwacc lib call.
Some points need to be aware of:
1. Code repo changed
Check out this repo instead of https://github.com/llvm/torch-mlir.
2. PyVenv instruction missing part
Another package is required for setting up python env. Add the following command at the end.
python -m pip install torch_mlir
_TODO: Maybe no need anymore, have no idea. I was facing this issue before. But, eventually, you need to compile your own torch_mlir package anyway. Probably suspend this step until you face problems when running Python code._
Env Setup Instruction
Follow the Official Development Env Setup Instruction to build the standard dev env.
TODO: End Users should not build from scratch. But we still need to compile our customized
pass
, the one that lowerslinalg.matmul
tohwacc lib call
.Some points need to be aware of:
1. Code repo changed
Check out this repo instead of
https://github.com/llvm/torch-mlir
.2. PyVenv instruction missing part
Another package is required for setting up python env. Add the following command at the end.
_TODO: Maybe no need anymore, have no idea. I was facing this issue before. But, eventually, you need to compile your own
torch_mlir
package anyway. Probably suspend this step until you face problems when running Python code._3. Build method selection
I use the following configuration:
CMake Build
->Building torch-mlir in-tree
CMake config
andBuild commands
, check do_cmake.script./do_cmake
4. Py Env Activate
The following is my approach. FIle
active_torch-mlir_venv