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


##########
src/tir/transforms/primfunc_utils.cc:
##########
@@ -30,6 +30,10 @@ 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 WithAttr(std::move(WithoutAttr(std::move(f), 
tvm::tir::attr::kIsHostFunc)),
+                      tvm::attr::kTarget, 
target->host.value_or(Target("llvm")));

Review Comment:
   Yes, when we use target tags like `nvidia/geforce-rtx-3070` the default 
target host is `None`.



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