This is an automated email from the ASF dual-hosted git repository.
tqchen pushed a commit to branch unity
in repository https://gitbox.apache.org/repos/asf/tvm.git
The following commit(s) were added to refs/heads/unity by this push:
new 64660db72a [MERGE] Fix after merge
64660db72a is described below
commit 64660db72ac6e5ca775266dadec28f83b5875478
Author: tqchen <[email protected]>
AuthorDate: Wed Jun 14 11:55:01 2023 -0400
[MERGE] Fix after merge
- Fix duplicates codegen spirv
- Update primfunc host attachment to include host
---
src/target/spirv/codegen_spirv.cc | 2 --
src/target/spirv/codegen_spirv.h | 1 -
src/tir/transforms/primfunc_utils.cc | 3 ++-
3 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/target/spirv/codegen_spirv.cc
b/src/target/spirv/codegen_spirv.cc
index 9e51eab1bc..3a98bfa305 100644
--- a/src/target/spirv/codegen_spirv.cc
+++ b/src/target/spirv/codegen_spirv.cc
@@ -765,8 +765,6 @@ void CodeGenSPIRV::VisitStmt_(const IfThenElseNode* op) {
builder_->StartLabel(merge_label);
}
-void CodeGenSPIRV::VisitStmt_(const DeclBufferNode* op) { VisitStmt(op->body);
}
-
void CodeGenSPIRV::VisitStmt_(const AllocateNode* op) {
ICHECK(!is_zero(op->condition));
ICHECK(!op->dtype.is_handle());
diff --git a/src/target/spirv/codegen_spirv.h b/src/target/spirv/codegen_spirv.h
index 0bf8c17323..1e7b535585 100644
--- a/src/target/spirv/codegen_spirv.h
+++ b/src/target/spirv/codegen_spirv.h
@@ -109,7 +109,6 @@ class CodeGenSPIRV : public ExprFunctor<spirv::Value(const
PrimExpr&)>,
void VisitStmt_(const IfThenElseNode* op) override;
void VisitStmt_(const DeclBufferNode* op) override;
void VisitStmt_(const AllocateNode* op) override;
- void VisitStmt_(const DeclBufferNode* op) override;
void VisitStmt_(const AttrStmtNode* op) override;
void VisitStmt_(const AssertStmtNode* op) override;
void VisitStmt_(const LetStmtNode* op) override;
diff --git a/src/tir/transforms/primfunc_utils.cc
b/src/tir/transforms/primfunc_utils.cc
index f844b51f53..8a5317a3c8 100644
--- a/src/tir/transforms/primfunc_utils.cc
+++ b/src/tir/transforms/primfunc_utils.cc
@@ -46,7 +46,8 @@ transform::Pass BindTarget(Target target) {
func = WithAttr(std::move(func), tvm::attr::kTarget, new_target);
}
} else if (func->HasNonzeroAttr(tvm::tir::attr::kIsHostFunc)) {
- func = WithAttr(std::move(func), tvm::attr::kTarget, target_host);
+ func =
+ WithAttr(std::move(func), tvm::attr::kTarget,
Target::WithHost(target_host, target_host));
} else if (is_externally_exposed) {
func = WithAttr(std::move(func), tvm::attr::kTarget, target);
} else {