iree icon indicating copy to clipboard operation
iree copied to clipboard

Don't explicitly set MLIR_TABLEGEN_EXE

Open marbre opened this issue 3 years ago • 6 comments

With llvm/llvm-project@112499f landed, MLIR_TABLEGEN_EXE is now set as a cache variable by the MLIR core project. Hence, there is no need to set it explicitly and doing so indeed breaks cross-compiling.

It might be necessary to wait for the integrate commit that lands commit llvm/llvm-project@112499f, before this one can be merged.

marbre avatar Aug 10 '22 17:08 marbre

Seems like this will need to be patched into the next integrate. Thanks Marius!

GMNGeoffrey avatar Aug 10 '22 20:08 GMNGeoffrey

It can be landed after the next integrate, no need to patch it into the integrate :) The motivation for sending this PR out so early was that I don't want forget to do so ;) Anyway, it will be fine to first land the integrate and I'll rebase afterwards.

marbre avatar Aug 10 '22 21:08 marbre

Oh, I thought you said that setting it broke cross-compilation? That's something we definitely want to keep green

GMNGeoffrey avatar Aug 10 '22 21:08 GMNGeoffrey

Yeah, I should have been more precise. When cross-compiling a project that is build with the LLVM external project mechanism, the wrong mlir-tblgen was selected. Instead of the native mlir-tblgen, the build systems tried to use the one cross-compiled for the target (and failed). So cross-compilation of the compiler didn’t worked before (this doesn’t affect the runtime). Commit llvm/llvm-project@112499f modifies MLIR core and fixes this for flang. This does the same for IREE. Anyway, without the patch cross-compiling IREE isn‘t broken more or less than before ;) Hope that makes things a bit clearer.

In consequence, no need to patch it into the next integrate. We can merge it after the integrate without breaking something that wasn‘t broken anyway.

marbre avatar Aug 10 '22 21:08 marbre

This relates a bit to https://github.com/iree-org/iree/issues/5420 (in that the CMake configuration needed tweaks to support cross compiling the compiler)

ScottTodd avatar Aug 10 '22 21:08 ScottTodd

This relates a bit to #5420 (in that the CMake configuration needed tweaks to support cross compiling the compiler)

Absolutely, thanks for linking this! And yes, there is more to do as documented in #5420 (I already though about iree-tblgen).

marbre avatar Aug 10 '22 22:08 marbre

@GMNGeoffrey Tests are passing now :)

marbre avatar Aug 16 '22 13:08 marbre