zxybazh commented on code in PR #14020:
URL: https://github.com/apache/tvm/pull/14020#discussion_r1110454568


##########
src/tir/transforms/primfunc_utils.cc:
##########
@@ -30,6 +30,12 @@ namespace tir {
 namespace transform {
 transform::Pass BindTarget(Target target) {
   auto fpass = [target](tir::PrimFunc f, IRModule m, transform::PassContext 
ctx) {
+    if (f->GetAttr<Integer>(tvm::tir::attr::kIsHostFunc) == 1) {
+      return WithAttrs(std::move(f), Map<String, ObjectRef>{
+                       {tvm::attr::kTarget, 
target->host.value_or(Target("llvm"))},

Review Comment:
   Not sure if this is the best option when target host is not available. This 
is my impression on the default target host.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to