Skip to content

Commit

Permalink
wrap tensorize with try/catch
Browse files Browse the repository at this point in the history
  • Loading branch information
masahi committed Apr 10, 2022
1 parent d4b496d commit 9e4f9df
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/meta_schedule/postproc/rewrite_tensorize.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@ void ApplyTensorization(const tir::Schedule& sch, const String& func_name,
std::string block_name = block_sref->StmtAs<tir::BlockNode>()->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) {
Expand Down

0 comments on commit 9e4f9df

Please sign in to comment.