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

tqchen 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 f5eb4c2  Rename build helper (#9297)
f5eb4c2 is described below

commit f5eb4c2d08edbb09d1971ba85462c1df90acb07c
Author: Michalis Papadimitriou <[email protected]>
AuthorDate: Sun Oct 17 00:15:30 2021 +0300

    Rename build helper (#9297)
---
 python/tvm/driver/build_module.py | 2 +-
 src/driver/driver_api.cc          | 7 ++++---
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/python/tvm/driver/build_module.py 
b/python/tvm/driver/build_module.py
index 29fff77..5ec44c6 100644
--- a/python/tvm/driver/build_module.py
+++ b/python/tvm/driver/build_module.py
@@ -260,7 +260,7 @@ def build(
         target_input_mod, target_host
     )
 
-    rt_mod_host = _driver_ffi.finalize_module(target_input_mod, target_host)
+    rt_mod_host = _driver_ffi.preprocess_module(target_input_mod, target_host)
 
     target_input_mod, target_host = Target.check_and_update_host_consist(
         target_input_mod, target_host
diff --git a/src/driver/driver_api.cc b/src/driver/driver_api.cc
index 2d57d6e..24cae79 100644
--- a/src/driver/driver_api.cc
+++ b/src/driver/driver_api.cc
@@ -426,7 +426,8 @@ std::pair<IRModule, IRModule> SplitMixedModule(IRModule 
mod_mixed, const Target&
   return {host_mod, device_mod};
 }
 
-runtime::Module FinalizeModule(const Map<Target, IRModule>& inputs_arg, const 
Target& host_target) {
+runtime::Module PreProcessModuleForBuild(const Map<Target, IRModule>& 
inputs_arg,
+                                         const Target& host_target) {
   std::vector<runtime::Module> device_modules;
   Map<Target, IRModule> inputs = inputs_arg;
   Target target_host = host_target;
@@ -480,9 +481,9 @@ runtime::Module FinalizeModule(const Map<Target, IRModule>& 
inputs_arg, const Ta
   return complete_mod;
 }
 
-TVM_REGISTER_GLOBAL("driver.finalize_module")
+TVM_REGISTER_GLOBAL("driver.preprocess_module")
     .set_body_typed([](const Map<Target, IRModule>& inputs_arg, Target 
host_target) {
-      return FinalizeModule(inputs_arg, host_target);
+      return PreProcessModuleForBuild(inputs_arg, host_target);
     });
 
 runtime::Module build(const Map<Target, IRModule>& inputs_arg, const Target& 
target_host_arg) {

Reply via email to