Skip to content

Commit e1b0572

Browse files
cperivolGoogle-ML-Automation
authored andcommitted
[mgpu] Allow bf16 printing
PiperOrigin-RevId: 744830111
1 parent 0d06731 commit e1b0572

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

jax/experimental/mosaic/gpu/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def _debug_scalar_ty_format(arg):
135135
return "%llu", arg
136136
if ir.F32Type.isinstance(arg.type):
137137
return "%f", arg
138-
if ir.F16Type.isinstance(arg.type):
138+
if ir.BF16Type.isinstance(arg.type) or ir.F16Type.isinstance(arg.type):
139139
arg = arith.extf(ir.F32Type.get(), arg)
140140
return "%f", arg
141141
raise NotImplementedError(f"Can't print the type {arg.type}")

0 commit comments

Comments
 (0)