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

[Bug] tvm 0.7.0 fails to build with LLVM 13 #9319

Closed
ggardet opened this issue Oct 19, 2021 · 4 comments
Closed

[Bug] tvm 0.7.0 fails to build with LLVM 13 #9319

ggardet opened this issue Oct 19, 2021 · 4 comments

Comments

@ggardet
Copy link
Contributor

ggardet commented Oct 19, 2021

Expected behavior

Build should succeed.

Actual behavior

Build fails with:

[ 1361s] /home/abuild/rpmbuild/BUILD/tvm-0.7.0/src/target/llvm/codegen_llvm.cc: In member function 'virtual llvm::Value* tvm::codegen::CodeGenLLVM::CreateIntrinsic(const tvm::tir::CallNode*)':
[ 1361s] /home/abuild/rpmbuild/BUILD/tvm-0.7.0/src/target/llvm/codegen_llvm.cc:772:41: error: no matching function for call to 'getName(llvm::Intrinsic::ID&, <brace-enclosed initializer list>)'
[ 1361s]   772 |              << llvm::Intrinsic::getName(id, {});
[ 1361s]       |                 ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
[ 1361s] In file included from /home/abuild/rpmbuild/BUILD/tvm-0.7.0/src/target/llvm/llvm_common.h:37,
[ 1361s]                  from /home/abuild/rpmbuild/BUILD/tvm-0.7.0/src/target/llvm/codegen_llvm.h:49,
[ 1361s]                  from /home/abuild/rpmbuild/BUILD/tvm-0.7.0/src/target/llvm/codegen_llvm.cc:25:
[ 1361s] /usr/include/llvm/IR/Intrinsics.h:56:13: note: candidate: 'llvm::StringRef llvm::Intrinsic::getName(llvm::Intrinsic::ID)'
[ 1361s]    56 |   StringRef getName(ID id);
[ 1361s]       |             ^~~~~~~
[ 1361s] /usr/include/llvm/IR/Intrinsics.h:56:13: note:   candidate expects 1 argument, 2 provided
[ 1361s] /usr/include/llvm/IR/Intrinsics.h:68:15: note: candidate: 'std::string llvm::Intrinsic::getName(llvm::Intrinsic::ID, llvm::ArrayRef<llvm::Type*>, llvm::Module*, llvm::FunctionType*)'
[ 1361s]    68 |   std::string getName(ID Id, ArrayRef<Type *> Tys, Module *M,
[ 1361s]       |               ^~~~~~~
[ 1361s] /usr/include/llvm/IR/Intrinsics.h:68:15: note:   candidate expects 4 arguments, 2 provided
[ 

Environment

TVM 0.7.0 on openSUSE Tumbleweed.

Steps to reproduce

Try to build with LLVM 13.

@vinx13
Copy link
Member

vinx13 commented Oct 19, 2021

there are some fixes required for llvm13

#if TVM_LLVM_VERSION >= 130
<< llvm::Intrinsic::getBaseName(id).str();
#else

@junrushao
Copy link
Member

should be fixed on mainline. would you mind checking it out? thanks!

@mshr-h
Copy link
Contributor

mshr-h commented Nov 18, 2021

I was able to build it correctly with TVM@3f2ae347.
Thanks!

@leandron
Copy link
Contributor

This looks fixed, so closing the issue.

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

No branches or pull requests

5 participants