llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
28.69k stars 11.86k forks source link

mlir: fatal error: `'mlir/Dialect/Mesh/Interfaces/ShardingInterface.h.inc' file not found` #111527

Closed sylvestre closed 2 weeks ago

sylvestre commented 2 weeks ago

Recent regression on Linux amd64:

FAILED: tools/mlir/lib/Dialect/Linalg/IR/CMakeFiles/obj.MLIRLinalgDialect.dir/LinalgDialect.cpp.o
/opt/sccache//sccache /build/source/build-llvm/bin/clang++ -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/build/source/build-llvm/tools/clang/stage2-bins/tools/mlir/lib/Dialect/Linalg/IR -I/build/source/mlir/lib/Dialect/Linalg/IR -I/build/source/build-llvm/tools/clang/stage2-bins/include -I/build/source/llvm/include -I/build/source/mlir/include -I/build/source/build-llvm/tools/clang/stage2-bins/tools/mlir/include -fstack-protector-strong -Wformat -Werror=format-security -Wno-unused-command-line-argument -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -ffile-prefix-map=/build/source/build-llvm/tools/clang/stage2-bins=../../../../ -ffile-prefix-map=/build/source/= -no-canonical-prefixes -Wundef -Werror=mismatched-tags -Werror=global-constructors -O2 -DNDEBUG -g1 -std=c++17  -fno-exceptions -funwind-tables -MD -MT tools/mlir/lib/Dialect/Linalg/IR/CMakeFiles/obj.MLIRLinalgDialect.dir/LinalgDialect.cpp.o -MF tools/mlir/lib/Dialect/Linalg/IR/CMakeFiles/obj.MLIRLinalgDialect.dir/LinalgDialect.cpp.o.d -o tools/mlir/lib/Dialect/Linalg/IR/CMakeFiles/obj.MLIRLinalgDialect.dir/LinalgDialect.cpp.o -c /build/source/mlir/lib/Dialect/Linalg/IR/LinalgDialect.cpp
In file included from /build/source/mlir/lib/Dialect/Linalg/IR/LinalgDialect.cpp:19:
/build/source/mlir/include/mlir/Dialect/Mesh/Interfaces/ShardingInterface.h:84:10: fatal error: 'mlir/Dialect/Mesh/Interfaces/ShardingInterface.h.inc' file not found
   84 | #include "mlir/Dialect/Mesh/Interfaces/ShardingInterface.h.inc"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
joker-eph commented 2 weeks ago

This looks like a missing dependency in CMake, so non-deterministic build failure...

Zhang-Zecheng commented 2 weeks ago

I ran into the same issue today. Is there any way to fix it?

joker-eph commented 2 weeks ago

Yes: the cmake library that builds LinalgDialect.cpp should get an added DEPENDS for the target providing the ShardingInterface.

Zhang-Zecheng commented 2 weeks ago

I am new to this since I was following the toturial. But is this something I should change here? https://github.com/llvm/llvm-project/pull/111603/commits/7712245ea43f174e35d831d3e82001c4381efa08

Yes: the cmake library that builds LinalgDialect.cpp should get an added DEPENDS for the target providing the ShardingInterface.