spcl/pymlir

installation procedure

arunchannaraju18 opened this issue · 7 comments

can i get the steps to install mlir python version
what are the dependencies i shouhld install

From the README, to install pymlir you can use pip. Just run pip install pymlir and the requirements will be installed for you.
If you wish to install the dependencies manually: the requirements are Python 3.6 or newer, and the packages in this file: https://github.com/spcl/pymlir/blob/master/requirements.txt

To manually install the requirements, use pip install -r requirements.txt.

@tbennun thank you
i am facing this error

$ pip install pymlir
Collecting pymlir
Could not find a version that satisfies the requirement pymlir (from versions: )
No matching distribution found for pymlir

You might be using Python 2.7. Try pip3 install pymlir

thank you @tbennun

i am getting this now

pymlir-master$ mlir-opt toy.mlir --mlir-print-op-generic > output.mlir
mlir-opt: command not found

pymlir does not depend on MLIR, so it does not install it. Please read the link in the README for instructions on how to install MLIR:
https://mlir.llvm.org/getting_started/

Thank u @tbennun
i think i have installed mlir

llvm-project/build$ cmake --build . --target check-mlir
[0/1] Running the MLIR regression tests
llvm-lit: /home/a/llvm-project/build/bin/../../llvm/utils/lit/lit/llvm/subst.py:127: note: Did not find PYTHON in :/home/a/llvm-project/build/./bin

Testing Time: 95.64s
Unsupported: 22
Passed : 547

Since all the tests pass, mlir-opt exists and is in one of the subfolders. You can probably try to look for it there.

Unfortunately MLIR support is out of the scope of this project. For more help, ask in the MLIR project itself.
Since pyMLIR is working for you, I will now close this issue.