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

Several issues were generated in building the source code with LLVM 18 #16488

Open
xwentian2020 opened this issue Jan 30, 2024 · 2 comments
Open
Labels
needs-triage PRs or issues that need to be investigated by maintainers to find the right assignees to address it type: bug

Comments

@xwentian2020
Copy link

A few issues were found in building TVM 0.13.0 by using LLVM 18 in Ubuntu22.04, and the way presented in cmake/config.cmake file was tried to build the source code.

llvm::CGFT_ObjectFile and llvm::CGFT_AssemblyFile in several files (codegen_amdgpu.cc codegen_hexagon.cc, codegen_nvptx.cc) should be replaed with llvm::CodeGenFileType::ObjectFile and llvm::CodeGenFileType::AssemblyFile.

BTW, in the file llvm_instance.cc, changes should be made as well in some code snippets which used llvm::CodeGenOpt::Level::None and similar statements. llvm::CodeGenOptLevel::None should be used instead in building the source code of TVM by LLVM 18.0.

FYI.

@xwentian2020 xwentian2020 added needs-triage PRs or issues that need to be investigated by maintainers to find the right assignees to address it type: bug labels Jan 30, 2024
@Hzfengsy
Copy link
Member

Hzfengsy commented Feb 2, 2024

Thanks for reporting this. Could you please send a PR to fix it?

@quic-sanirudh
Copy link
Contributor

These changes were done a while back to support LLVM 18 in #15921. I think the #ifdef macro guards should have ensured that we use the correct type if the LLVM version was >= 18.0.

For example in llvm_instance.cc, this condition should become false and it should use the right check.

I'm using LLVM 18 and I'm not seeing the build errors, so could you please check whether the TVM_LLVM_VERSION macro is set correctly?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-triage PRs or issues that need to be investigated by maintainers to find the right assignees to address it type: bug
Projects
None yet
Development

No branches or pull requests

3 participants