Skip to content

Commit c961133

Browse files
committed
Avoid "host" tag for now
1 parent 3310a95 commit c961133

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/target/target_kind.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ TVM_REGISTER_TARGET_KIND("llvm", kDLCPU)
275275
.add_attr_option<Integer>("opt-level")
276276
// LLVM command line flags, see below
277277
.add_attr_option<Array<String>>("cl-opt")
278-
.set_default_keys({"cpu", "host"})
278+
.set_default_keys({"cpu"})
279279
// Force the external codegen kind attribute to be registered, even if no external
280280
// codegen targets are enabled by the TVM build.
281281
.set_attr<Bool>(tvm::attr::kIsExternalCodegen, Bool(false))
@@ -308,7 +308,7 @@ TVM_REGISTER_TARGET_KIND("c", kDLCPU)
308308
.add_attr_option<String>("march")
309309
.add_attr_option<Integer>("workspace-byte-alignment")
310310
.add_attr_option<Integer>("constants-byte-alignment")
311-
.set_default_keys({"cpu", "host"})
311+
.set_default_keys({"cpu"})
312312
.set_target_parser(tvm::target::parsers::cpu::ParseTarget);
313313

314314
TVM_REGISTER_TARGET_KIND("cuda", kDLCUDA)
@@ -422,10 +422,10 @@ TVM_REGISTER_TARGET_KIND("hexagon", kDLHexagon)
422422
.add_attr_option<Array<String>>("llvm-options")
423423
.add_attr_option<Integer>("num-cores")
424424
.add_attr_option<Integer>("vtcm-capacity")
425-
.set_default_keys({"hexagon", "host"});
425+
.set_default_keys({"hexagon", "cpu"});
426426

427427
TVM_REGISTER_TARGET_KIND("stackvm", kDLCPU) // line break
428-
.set_default_keys({"host"});
428+
.set_default_keys({"cpu"});
429429

430430
TVM_REGISTER_TARGET_KIND("ext_dev", kDLExtDev);
431431

src/tir/transforms/ir_utils.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -696,7 +696,7 @@ std::optional<bool> IsHostFunc(const PrimFunc& func) {
696696
if (func->HasNonzeroAttr(tvm::tir::attr::kIsHostFunc)) {
697697
return true;
698698
} else if (auto target = func->GetAttr<Target>(tvm::attr::kTarget)) {
699-
return target.value()->HasKey("host");
699+
return target.value()->HasKey("cpu");
700700
} else {
701701
return std::nullopt;
702702
}

0 commit comments

Comments
 (0)