-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Closed
Labels
needs-triagePRs or issues that need to be investigated by maintainers to find the right assignees to address itPRs or issues that need to be investigated by maintainers to find the right assignees to address ittype: bug
Description
Expected behavior
Successfully completed make
Actual behavior
After I installed llvm, I configured USE_LLVM in config.cmake. When make tvm, I encountered the following error
/home/Project/tvm/src/target/llvm/codegen_blob.cc:29:10: fatal error: llvm/ADT/Triple.h: No such file or directory
29 | #include <llvm/ADT/Triple.h>
| ^~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/tvm_objs.dir/build.make:8280: CMakeFiles/tvm_objs.dir/src/target/llvm/codegen_blob.cc.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/home/observer/Project/tvm/src/target/llvm/codegen_llvm.cc:30:10: fatal error: llvm/ADT/Triple.h: No such file or directory
30 | #include <llvm/ADT/Triple.h>
| ^~~~~~~~~~~~~~~~~~~
compilation terminated.
So I executed the following statement:
~/Project$ find . -name Triple.h
./llvm-project/llvm/include/llvm/TargetParser/Triple.h
./llvm/include/llvm/TargetParser/Triple.h
This file exists, it's just a path problem
Environment
- Operating System
Ubuntu20.04.5 LTS
- TVM version
commit aa927df6b3e33856998cb3a4938d8fb4cbdbcec9 (HEAD -> main, origin/main, origin/HEAD)
Author: Sergey <[email protected]>
Date: Thu Feb 16 11:12:27 2023 +0300
- llvm version
commit 1b43650c419fd7448af1a9a097e062d1f64ca485 (grafted, HEAD -> main, origin/main, origin/HEAD)
Author: Vitaly Buka <[email protected]>
Date: Tue Feb 21 18:28:06 2023 -0800
Solution
**diff --git a/src/target/llvm/codegen_blob.cc b/src/target/llvm/codegen_blob.cc**
**index b67aac480..1e9084c81 100644**
**--- a/src/target/llvm/codegen_blob.cc**
**+++ b/src/target/llvm/codegen_blob.cc**
@@ -26,7 +26,7 @@
#include <llvm/ADT/SmallVector.h>
#include <llvm/ADT/StringRef.h>
-#include <llvm/ADT/Triple.h>
+#include <llvm/TargetParser/Triple.h>
#include <llvm/ADT/Twine.h>
#include <llvm/IR/BasicBlock.h>
#include <llvm/IR/Constants.h>
**diff --git a/src/target/llvm/codegen_llvm.cc b/src/target/llvm/codegen_llvm.cc**
**index dcca33732..73f27205e 100644**
**--- a/src/target/llvm/codegen_llvm.cc**
**+++ b/src/target/llvm/codegen_llvm.cc**
@@ -27,7 +27,7 @@
#include <llvm/ADT/ArrayRef.h>
#include <llvm/ADT/SmallVector.h>
#include <llvm/ADT/StringRef.h>
-#include <llvm/ADT/Triple.h>
+#include <llvm/TargetParser/Triple.h>
#include <llvm/Analysis/TargetTransformInfo.h>
#if TVM_LLVM_VERSION >= 50
#include <llvm/BinaryFormat/Dwarf.h>Triage
- backend: llvm
Metadata
Metadata
Assignees
Labels
needs-triagePRs or issues that need to be investigated by maintainers to find the right assignees to address itPRs or issues that need to be investigated by maintainers to find the right assignees to address ittype: bug