Skip to content

Commit 8902bbf

Browse files
committed
merge newest commit
1 parent ca8497a commit 8902bbf

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/target/codegen_cuda.cc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2441,6 +2441,16 @@ void CodeGenTileLangCUDA::VisitStmt_(const EvaluateNode *op) {
24412441
stream << " " << vid_global_barrier_expect_ << " = 0;\n";
24422442
PrintIndent();
24432443
stream << "}\n";
2444+
}
2445+
if (call && (call->op.same_as(tvm::tl::device_assert()))) {
2446+
std::string cond = PrintExpr(call->args[0]);
2447+
this->PrintIndent();
2448+
stream << "device_assert(" << cond << ");\n";
2449+
} else if (call && call->op.same_as(tvm::tl::device_assert_with_msg())) {
2450+
std::string cond = PrintExpr(call->args[0]);
2451+
std::string msg_expr = PrintExpr(call->args[1]);
2452+
this->PrintIndent();
2453+
stream << "device_assert_with_msg(" << cond << ", " << msg_expr << ");\n";
24442454
} else {
24452455
CodeGenC::VisitStmt_(op);
24462456
}

0 commit comments

Comments
 (0)