tqchen commented on a change in pull request #4657: [CodeGen] Generate blob use 
LLVM directly
URL: https://github.com/apache/incubator-tvm/pull/4657#discussion_r364338819
 
 

 ##########
 File path: src/codegen/build_module.cc
 ##########
 @@ -882,6 +887,16 @@ TVM_REGISTER_GLOBAL("_GetCurrentTarget")
   *ret = Target::Current(allow_not_defined);
   });
 
+TVM_REGISTER_GLOBAL("_GetLLVMTargetHost")
+.set_body([](TVMArgs args, TVMRetValue* ret) {
+  *ret = Target::GetLLVMTargetHost();
+});
+
+TVM_REGISTER_GLOBAL("_SetLLVMTargetHost")
 
 Review comment:
   It is a bit bad to use global state to pass this argument around. Would be 
great to pass this argument as an argument of PackToLLVM instead.
   
   
   I wonder if it is necessary to set the target to be the specific target, or 
can we directly use a somewhat generic target (this means LLVM won't perform 
any target specific optimization which is fine here)

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to