Skip to content

Commit

Permalink
[llvm][oncall] Fix build for llvm-18+ (pytorch#115652)
Browse files Browse the repository at this point in the history
Summary:
https://reviews.llvm.org/D137838 moved Host.h and some other files under TargetParser.
llvm/llvm-project#74261 Removed it from Support folder.

Pull Request resolved: pytorch#115652
Approved by: https://github.com/davidberard98
  • Loading branch information
ayermolo authored and dmenig committed Dec 21, 2023
1 parent e385d93 commit 611cf78
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions torch/csrc/jit/tensorexpr/llvm_codegen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@
#include <llvm/Passes/PassBuilder.h>
#pragma GCC diagnostic pop

#if LLVM_VERSION_MAJOR >= 18
#include <llvm/TargetParser/Host.h>
#else
#include <llvm/Support/Host.h>
#endif
#include <llvm/Support/TargetSelect.h>
#include <llvm/Transforms/IPO/AlwaysInliner.h>
#include <llvm/Transforms/Scalar/DCE.h>
Expand Down
4 changes: 4 additions & 0 deletions torch/csrc/jit/tensorexpr/llvm_jit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@ C10_DIAGNOSTIC_POP()
#include <llvm/IR/Mangler.h>
#include <llvm/Support/CFGUpdate.h>
#include <llvm/Support/DynamicLibrary.h>
#if LLVM_VERSION_MAJOR >= 18
#include <llvm/TargetParser/Host.h>
#else
#include <llvm/Support/Host.h>
#endif
#include <llvm/Support/raw_ostream.h>
#include <llvm/Target/TargetMachine.h>

Expand Down

0 comments on commit 611cf78

Please sign in to comment.