This is an automated email from the ASF dual-hosted git repository.

kparzysz pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tvm.git


The following commit(s) were added to refs/heads/main by this push:
     new 5f9ff8ad6e Add missing headers to llvm_module.cc/.h, NFC (#11925)
5f9ff8ad6e is described below

commit 5f9ff8ad6e3947f157438e76deef36af02fe00f8
Author: Krzysztof Parzyszek <kparz...@quicinc.com>
AuthorDate: Mon Jun 27 18:23:59 2022 -0500

    Add missing headers to llvm_module.cc/.h, NFC (#11925)
---
 src/target/llvm/llvm_module.cc | 19 +++++++++++++++++++
 src/target/llvm/llvm_module.h  |  7 +++++--
 2 files changed, 24 insertions(+), 2 deletions(-)

diff --git a/src/target/llvm/llvm_module.cc b/src/target/llvm/llvm_module.cc
index 8e87229155..861d191050 100644
--- a/src/target/llvm/llvm_module.cc
+++ b/src/target/llvm/llvm_module.cc
@@ -23,6 +23,9 @@
  */
 #ifdef TVM_LLVM_VERSION
 
+#include "llvm_module.h"
+
+#include <dmlc/io.h>
 #include <llvm/ADT/SmallString.h>
 #include <llvm/ADT/StringRef.h>
 #include <llvm/Bitcode/BitcodeWriter.h>
@@ -46,11 +49,24 @@
 #include <llvm/Transforms/Utils/Cloning.h>
 #include <tvm/ir/module.h>
 #include <tvm/relay/runtime.h>
+#include <tvm/runtime/container/array.h>
+#include <tvm/runtime/container/string.h>
+#include <tvm/runtime/metadata.h>
+#include <tvm/runtime/module.h>
+#include <tvm/runtime/object.h>
 #include <tvm/runtime/packed_func.h>
 #include <tvm/runtime/registry.h>
 #include <tvm/target/codegen.h>
+#include <tvm/target/target.h>
 
+#include <algorithm>
+#include <memory>
 #include <mutex>
+#include <sstream>
+#include <string>
+#include <system_error>
+#include <utility>
+#include <vector>
 
 #include "../../runtime/file_utils.h"
 #include "../../runtime/library_module.h"
@@ -416,6 +432,7 @@ class LLVMModuleNode final : public runtime::ModuleNode {
     runtime::InitContextFunctions(
         [this](const char* name) { return 
reinterpret_cast<void*>(GetGlobalAddr(name)); });
   }
+
   // Get global address from execution engine.
   uint64_t GetGlobalAddr(const std::string& name) const {
     // first verifies if GV exists.
@@ -425,6 +442,7 @@ class LLVMModuleNode final : public runtime::ModuleNode {
       return 0;
     }
   }
+
   uint64_t GetFunctionAddr(const std::string& name) const {
     // first verifies if GV exists.
     if (mptr_->getFunction(name) != nullptr) {
@@ -611,4 +629,5 @@ TVM_REGISTER_GLOBAL("runtime.CreateLLVMCrtMetadataModule")
 
 }  // namespace codegen
 }  // namespace tvm
+
 #endif  // TVM_LLVM_VERSION
diff --git a/src/target/llvm/llvm_module.h b/src/target/llvm/llvm_module.h
index 660d81400b..3a50c2c424 100644
--- a/src/target/llvm/llvm_module.h
+++ b/src/target/llvm/llvm_module.h
@@ -25,11 +25,14 @@
 #ifndef TVM_TARGET_LLVM_LLVM_MODULE_H_
 #define TVM_TARGET_LLVM_LLVM_MODULE_H_
 
+#ifdef TVM_LLVM_VERSION
+
+#include <tvm/relay/runtime.h>
+#include <tvm/runtime/container/array.h>
+#include <tvm/runtime/metadata.h>
 #include <tvm/runtime/module.h>
 #include <tvm/target/target.h>
 
-#ifdef TVM_LLVM_VERSION
-
 namespace tvm {
 namespace codegen {
 

Reply via email to