Open Menooker opened 1 year ago
Using "option 1" in the Readme:
(base) username@machine:~/llvm/build$ /usr/bin/c++ --version
c++ (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
(base) username@machine:~/llvm/build$ cat ../../mlir-extensions/build_tools/llvm_version.txt
d20190e68413634b87f0f9426312a0e9d8456d18
(base) username@machine:~/llvm/build$ git log
commit d20190e68413634b87f0f9426312a0e9d8456d18 (HEAD)
Author: Fangrui Song <i@maskray.me>
Date: Fri Sep 29 10:13:06 2023 -0700
[test] Change llc -march=aarch64|arm64 to -mtriple=aarch64|arm64
Similar to commit 806761a7629df268c8aed49657aeccffa6bca449 to avoid issues due
to object file format differences. These tests are currently benign.
(base) username@machine:~/llvm/build$ /home/shared/bin/cmake-3.27/bin/cmake ../llvm -G Ninja -DLLVM_ENABLE_PROJECTS=mlir -DLLVM_BUILD_EXAMPLES=ON -DLLVM_TARGETS_TO_BUILD="X86" -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=ON -DLLVM_EXTERNAL_PROJECTS="Imex" -DLLVM_EXTERNAL_IMEX_SOURCE_DIR=../../mlir-extensions
(base) username@machine:~/llvm/build$ /home/shared/bin/cmake-3.27/bin/cmake --build . --target check-imex
I have found the same issue:
FAILED: tools/Imex/lib/Conversion/XeGPUToSPIRV/CMakeFiles/obj.XeGPUToSPIRV.dir/XeGPUToSPIRV.cpp.o
/usr/bin/g++ -DBUILD_EXAMPLES -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D_LIBCPP_ENABLE_HARDENED_MODE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/iusers/etiotto/imex/llvm-project/build/tools/Imex/lib/Conversion/XeGPUToSPIRV -I/iusers/etiotto/imex/mlir-extensions/lib/Conversion/XeGPUToSPIRV -I/iusers/etiotto/imex/llvm-project/build/include -I/iusers/etiotto/imex/llvm-project/llvm/include -I/iusers/etiotto/imex/llvm-project/llvm/../mlir/include -I/iusers/etiotto/imex/llvm-project/build/tools/mlir/include -I/iusers/etiotto/imex/mlir-extensions/include -I/iusers/etiotto/imex/llvm-project/build/tools/Imex/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -fno-lifetime-dse -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -fno-lifetime-dse -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -DBUILD_EXAMPLES -D_GNU_SOURCE -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_LIBCPP_ENABLE_HARDENED_MODE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -std=c++17 -MD -MT tools/Imex/lib/Conversion/XeGPUToSPIRV/CMakeFiles/obj.XeGPUToSPIRV.dir/XeGPUToSPIRV.cpp.o -MF tools/Imex/lib/Conversion/XeGPUToSPIRV/CMakeFiles/obj.XeGPUToSPIRV.dir/XeGPUToSPIRV.cpp.o.d -o tools/Imex/lib/Conversion/XeGPUToSPIRV/CMakeFiles/obj.XeGPUToSPIRV.dir/XeGPUToSPIRV.cpp.o -c /iusers/etiotto/imex/mlir-extensions/lib/Conversion/XeGPUToSPIRV/XeGPUToSPIRV.cpp
/iusers/etiotto/imex/mlir-extensions/lib/Conversion/XeGPUToSPIRV/XeGPUToSPIRV.cpp: In function ‘void {anonymous}::lookupOrInsertIntrinsic(mlir::ConversionPatternRewriter&, mlir::Operation*, std::string, mlir::FunctionType)’:
/iusers/etiotto/imex/mlir-extensions/lib/Conversion/XeGPUToSPIRV/XeGPUToSPIRV.cpp:112:54: error: cannot convert ‘mlir::StringAttr’ to ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’}
112 | nameAttr, linkageTypeAttr);
| ^~~~~~~~
| |
| mlir::StringAttr
Fixed by PR #667.
@etiotto You need to apply the patches under build_tools/patches from imex in your llvm project and rebuild llvm and imex
Seems a C++ problem: