tenstorrent / tt-mlir

Tenstorrent MLIR compiler
https://tenstorrent.github.io/tt-mlir/
Apache License 2.0
51 stars 7 forks source link

Add support for stablehlo from tt-mlir project. #447

Closed uazizTT closed 3 weeks ago

uazizTT commented 3 weeks ago

Add support for stablehlo from tt-mlir project as an embedded project.

Stablehlo is disabled by default and can be enabled by turning on TTMLIR_ENABLE_STABLEHLO flag.

nsmithtt commented 3 weeks ago

You have some failing tests, because it's disabled in build:

FAIL: TTMLIR :: ttmlir/Dialect/TTIR/stablehlo_to_ttir_addop.mlir (24 of 44)

See test/lit.site.cfg.py.in, as an example see config.enable_bindings_python, but we probably want something like:

config.enable_stablehlo = @TTMLIR_ENABLE_STABLEHLO@ and "@TTMLIR_ENABLE_STABLEHLO@" == "ON"

And then inside of test/lit.cfg.py:

if config.enable_stablehlo:
    config.available_features.add("stablehlo")

Finally, inside of the test:

// REQUIRES: stablehlo

See https://llvm.org/docs/TestingGuide.html for more info.

nsmithtt commented 3 weeks ago

Now failing with:

  add_subdirectory given source "/opt/ttmlir-toolchain/src/stablehlo" which
  is not an existing directory.

@vmilosevic will the environment build automatically kick off a new docker build? This used to use GitHub cache

This commit updates the env

vmilosevic commented 3 weeks ago

Now failing with:

  add_subdirectory given source "/opt/ttmlir-toolchain/src/stablehlo" which
  is not an existing directory.

@vmilosevic will the environment build automatically kick off a new docker build? This used to use GitHub cache

This commit updates the env

No, it's not automated, you need to manually gick off the docker image build.

image

I added a change to build docker images on self-hosted runner, building large images on Github runners sometimes runs out of space and also fails randomly without any log :(

Build job: https://github.com/tenstorrent/tt-mlir/actions/runs/10468325323

vmilosevic commented 3 weeks ago

My bad, the docker build was always using code from the main, not the current branch 🤦‍♂️ I'm adding a fix now and building the image again.

vmilosevic commented 3 weeks ago

👍 All is good, Docker changes are my commits