You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by kp...@apache.org on 2021/10/01 23:53:14 UTC

[tvm] branch main updated: [LLVM] Rename t_tvm_context_ to t_tvm_device_, NFC (#9176)

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 b0ed3a0  [LLVM] Rename t_tvm_context_ to t_tvm_device_, NFC (#9176)
b0ed3a0 is described below

commit b0ed3a01524b3129513a409e9f7875970e276953
Author: Krzysztof Parzyszek <kp...@quicinc.com>
AuthorDate: Fri Oct 1 18:52:57 2021 -0500

    [LLVM] Rename t_tvm_context_ to t_tvm_device_, NFC (#9176)
    
    Follow the change from DLContext to DLDevice.
---
 src/target/llvm/codegen_cpu.cc     | 4 ++--
 src/target/llvm/codegen_cpu.h      | 2 +-
 src/target/llvm/codegen_hexagon.cc | 6 +++---
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/target/llvm/codegen_cpu.cc b/src/target/llvm/codegen_cpu.cc
index 466f853..3ecf404 100644
--- a/src/target/llvm/codegen_cpu.cc
+++ b/src/target/llvm/codegen_cpu.cc
@@ -46,10 +46,10 @@ void CodeGenCPU::Init(const std::string& module_name, llvm::TargetMachine* tm,
   export_system_symbols_.clear();
   // TVM runtime types
   t_tvm_shape_index_ = llvm::Type::getIntNTy(*ctx, DataType::ShapeIndex().bits());
-  t_tvm_context_ = llvm::StructType::create({t_int_, t_int_});
+  t_tvm_device_ = llvm::StructType::create({t_int_, t_int_});
   t_tvm_type_ = llvm::StructType::create({t_int8_, t_int8_, t_int16_});
   t_tvm_func_handle_ = t_void_p_;
-  t_tvm_array_ = llvm::StructType::create({t_void_p_, t_tvm_context_, t_int_, t_tvm_type_,
+  t_tvm_array_ = llvm::StructType::create({t_void_p_, t_tvm_device_, t_int_, t_tvm_type_,
                                            t_tvm_shape_index_->getPointerTo(),
                                            t_tvm_shape_index_->getPointerTo(), t_int64_});
   t_tvm_value_ = llvm::StructType::create({t_float64_});
diff --git a/src/target/llvm/codegen_cpu.h b/src/target/llvm/codegen_cpu.h
index 402189e..58e314e 100644
--- a/src/target/llvm/codegen_cpu.h
+++ b/src/target/llvm/codegen_cpu.h
@@ -63,7 +63,7 @@ class CodeGenCPU : public CodeGenLLVM {
   // TVM related data types
   llvm::Type* t_tvm_shape_index_{nullptr};
   llvm::Type* t_tvm_func_handle_{nullptr};
-  llvm::StructType* t_tvm_context_{nullptr};
+  llvm::StructType* t_tvm_device_{nullptr};
   llvm::StructType* t_tvm_type_{nullptr};
   llvm::StructType* t_tvm_array_{nullptr};
   llvm::StructType* t_tvm_value_{nullptr};
diff --git a/src/target/llvm/codegen_hexagon.cc b/src/target/llvm/codegen_hexagon.cc
index bffb620..bd22532 100644
--- a/src/target/llvm/codegen_hexagon.cc
+++ b/src/target/llvm/codegen_hexagon.cc
@@ -115,7 +115,7 @@ class CodeGenHexagon final : public CodeGenLLVM {
   llvm::Type* t_tvm_func_handle_{nullptr};
   llvm::Type* t_tvm_value_{nullptr};
   llvm::Type* t_tvm_shape_index_{nullptr};
-  llvm::Type* t_tvm_context_{nullptr};
+  llvm::Type* t_tvm_device_{nullptr};
   llvm::Type* t_tvm_type_{nullptr};
   llvm::Type* t_tvm_array_{nullptr};
 
@@ -160,12 +160,12 @@ void CodeGenHexagon::Init(const std::string& module_name, llvm::TargetMachine* t
   func_handle_map_.clear();
   t_tvm_value_ = llvm::StructType::create({t_float64_}, "t_tvm_value");
   t_tvm_shape_index_ = llvm::Type::getIntNTy(*ctx, DataType::ShapeIndex().bits());
-  t_tvm_context_ = llvm::StructType::create({t_int_, t_int_}, "t_tvm_context");
+  t_tvm_device_ = llvm::StructType::create({t_int_, t_int_}, "t_tvm_device");
   t_tvm_type_ = llvm::StructType::create({t_int8_, t_int8_, t_int16_}, "t_tvm_type");
   t_tvm_func_handle_ = t_void_p_;
   // DLTensor
   t_tvm_array_ = llvm::StructType::create(
-      {t_void_p_, t_tvm_context_, t_int_, t_tvm_type_, t_tvm_shape_index_->getPointerTo(),
+      {t_void_p_, t_tvm_device_, t_int_, t_tvm_type_, t_tvm_shape_index_->getPointerTo(),
        t_tvm_shape_index_->getPointerTo(), t_int64_},
       "t_tvm_array");