diff --git a/src/meta_schedule/postproc/rewrite_tensorize.cc b/src/meta_schedule/postproc/rewrite_tensorize.cc index e54d43ff5bb5d..1735ceb10cf44 100644 --- a/src/meta_schedule/postproc/rewrite_tensorize.cc +++ b/src/meta_schedule/postproc/rewrite_tensorize.cc @@ -39,7 +39,11 @@ void ApplyTensorization(const tir::Schedule& sch, const String& func_name, std::string block_name = block_sref->StmtAs()->name_hint; if (block_name.find("init") == std::string::npos) { jobs.emplace_back(block_name, [sch, intrin_name](tir::BlockRV block) { - sch->Tensorize(block, intrin_name.value()); + try { + sch->Tensorize(block, intrin_name.value()); + } catch (const std::exception& e) { + LOG(WARNING) << "Tensorize failed with error " << e.what(); + } }); } else if (vectorize_init_loop) { jobs.emplace_back(block_name, [sch](tir::BlockRV block) {