Skip to content

Conversation

@rolfmorel
Copy link
Contributor

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.

Adds lit as a test dependency via pyproject.toml. Adds FileCheck as an
external dependency -- for CI we use Ubuntu's llvm-dev package.
@rolfmorel rolfmorel force-pushed the users/rolfmorel/lit-ci branch from e01b506 to af53648 Compare November 19, 2025 18:56
- 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.
Copy link
Member

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]

@rengolin
Copy link
Member

@banach-space do you know what's wrong with the Arm build? Do we have torch-mlir packages already being built after your PR?

@rolfmorel
Copy link
Contributor Author

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
Copy link
Member

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

Copy link
Contributor Author

@rolfmorel rolfmorel Nov 19, 2025

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.

Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants