You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by "zxybazh (via GitHub)" <gi...@apache.org> on 2023/02/18 00:01:08 UTC
[GitHub] [tvm] zxybazh commented on a diff in pull request #14020: [TIR] Enable Host Func Attribute for PrimFunc
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: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org