Skip to content

Commit 999e74e

Browse files
author
nicunxiao
committed
fix lint
1 parent 37804b3 commit 999e74e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/target/codegen_cuda.cc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -954,7 +954,10 @@ void CodeGenTileLangCUDA::VisitExpr_(const CastNode *op, std::ostream &os) {
954954
}
955955

956956
const char *convert_part =
957-
(from_ty.is_bfloat16() || target_ty.is_float8_e4m3()) ? ")(half)(" : ")(";
957+
(from_ty.is_bfloat16() &&
958+
(target_ty.is_float8_e4m3() || target_ty.is_float8_e5m2()))
959+
? ")(half)("
960+
: ")(";
958961

959962
// Fallback: elementwise cast
960963
for (int i = 0, lanes = from_ty.lanes(); i < lanes; ++i) {

0 commit comments

Comments
 (0)