-
Notifications
You must be signed in to change notification settings - Fork 7
[Examples][CI] Enable testing of examples through lit #22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Adds lit as a test dependency via pyproject.toml. Adds FileCheck as an external dependency -- for CI we use Ubuntu's llvm-dev package.
e01b506 to
af53648
Compare
| - name: Run MLP From File | ||
| run: |- | ||
| uv run python/examples/ingress/torch/mlp_from_file.py | ||
| sudo apt-get install llvm-dev # Obtain FileCheck, used in testing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use -y to make sure it doesn't lock asking [y/N]
|
@banach-space do you know what's wrong with the Arm build? Do we have torch-mlir packages already being built after your PR? |
|
The issue is with the specified version of torch-mlir. For lighthouse's current version of torch-mlir, i.e. the one that is currently used in the Github actions, there's no ARM version. And for all released ARM versions of the torch-mlir python package there is no x86 version (due to a hiccup on the torch-mlir-release repo). Hopefully tomorrow there will be a torch-mlir nightly package for both ARM and x86. 🤞 |
| @@ -1,3 +1,5 @@ | |||
| # RUN: %PYTHON %s | FileCheck %s | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could also add python in the tool substitution
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed. I had tried that and it works, but then decided to keep to what llvm-project does: e.g. https://github.com/llvm/llvm-project/blob/main/mlir/test/python/dialects/builtin.py
Besides the prior work argument, another reason for me is that (at least currently) the python executable would be replaced by uv run, which in my mind is more magic/surprising than %PYTHON being converted to something which is not a normal python executable. If people think this is fine, I am okay with going with # RUN: python %s | FileCheck %s.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, that's a good point. We need to make uv run available without forcing it in the tests, which could also become python in some cases.
Adds lit as a test dependency via pyproject.toml. Adds FileCheck as an external dependency -- for CI we use Ubuntu's llvm-dev package.
TODO: add docs.