This is an archive of the discontinued LLVM Phabricator instance.

mlir/opdsl: fix and inline type annotations, trim includes
AbandonedPublic

Authored by artagnon on Dec 13 2022, 10:26 AM.

Details

Summary

This patch cleans up simple issues in the opdsl/lang Python files.

Signed-off-by: Ramkumar Ramachandra <r@artagnon.com>

Diff Detail

Event Timeline

artagnon created this revision.Dec 13 2022, 10:26 AM
artagnon requested review of this revision.Dec 13 2022, 10:26 AM

Looks like a good cleanup! I am not really the owner of OpDSL anymore and suggest to wait for an accept from @nicolasvasilache.

Ping. This should be quite straightforward to review.

Have you tested this with Python 3.6? (I have been delayed in discussion to bump that requirement and ran into failure with type annotations on my previous python commit)

I've tested it with Python 3.10, but shouldn't the CI fail my commit if it doesn't build on the minimum required version of Python?

I see the following in LLVM's CMakeLists.txt:

if(LLVM_INCLUDE_TESTS)
  # Lit test suite requires at least python 3.6
  set(LLVM_MINIMUM_PYTHON_VERSION 3.6)
else()
  # FIXME: it is unknown if this is the actual minimum bound
  set(LLVM_MINIMUM_PYTHON_VERSION 3.0)
endif()

Should I remove the conditional and set the minimum required version to 3.6 uniformly, since the CI doesn't test the else codepath?

Python 3.6 isn't even available via homebrew, and I don't want to have to compile by hand: not sure how to test with 3.6.

No unfortunately this only failed for me during post submit and buildbots. I ran into same issue and had to resort to using podman (with mlir-nvidia docker image that is checked in). I should have RFC out Monday or so about bumping to 3.8 (the change in 3.7 wrt types was big one syntax wise AFAICS).

Ping. Any progress on the Python version bump?

artagnon abandoned this revision.Sep 22 2023, 4:58 AM