Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build failure on main branch. #663

Open
Menooker opened this issue Oct 10, 2023 · 4 comments
Open

Build failure on main branch. #663

Menooker opened this issue Oct 10, 2023 · 4 comments
Assignees

Comments

@Menooker
Copy link

Seems a C++ problem:

/home/username/mlir-extensions/lib/Conversion/XeGPUToSPIRV/XeGPUToSPIRV.cpp: In function ‘void {anonymous}::lookupOrInsertIntrinsic(mlir::ConversionPatternRewriter&, mlir::Operation*, std::string, mlir::FunctionType)’:
/home/username/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
In file included from /home/username/llvm/llvm/../mlir/include/mlir/Dialect/SPIRV/IR/SPIRVAttributes.h:22,
                 from /home/username/llvm/llvm/../mlir/include/mlir/Dialect/SPIRV/IR/SPIRVOps.h:17,
                 from /home/username/mlir-extensions/include/imex/Conversion/XeGPUToSPIRV/XeGPUToSPIRV.h:18,
                 from /home/username/mlir-extensions/lib/Conversion/XeGPUToSPIRV/XeGPUToSPIRV.cpp:15:
/home/username/llvm/build/tools/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVAttributes.h.inc:433:78: note:   initializing argument 2 of ‘static mlir::spirv::LinkageAttributesAttr mlir::spirv::LinkageAttributesAttr::get(mlir::MLIRContext*, std::string, mlir::spirv::LinkageTypeAttr)’
  433 |   static LinkageAttributesAttr get(::mlir::MLIRContext *context, std::string linkage_name, mlir::spirv::LinkageTypeAttr linkage_type);
      |                                                                  ~~~~~~~~~~~~^~~~~~~~~~~~
ninja: build stopped: subcommand failed.
@Menooker
Copy link
Author

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 <[email protected]>
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

@etiotto
Copy link

etiotto commented Nov 3, 2023

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

@etiotto etiotto self-assigned this Nov 3, 2023
@etiotto
Copy link

etiotto commented Nov 3, 2023

Fixed by PR #667.

@etiotto etiotto mentioned this issue Nov 3, 2023
6 tasks
@nbpatel
Copy link
Contributor

nbpatel commented Nov 6, 2023

@etiotto You need to apply the patches under build_tools/patches from imex in your llvm project and rebuild llvm and imex

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants