Skip to content

Commit d96c7e3

Browse files
committed
x
1 parent 6a21194 commit d96c7e3

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

coreai_torch/_utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1057,7 +1057,8 @@ def replace_pad_with_mode(
10571057

10581058
# padding_value is ignored for non-constant modes, but the op still requires
10591059
# a constant operand of the input's exact dtype (a cast op is rejected by the
1060-
# backend). Passing the MLIR element type preserves bf16/float8 exactly.
1060+
# backend). Passing the MLIR element type keeps the constant's dtype exact
1061+
# (e.g. bf16) instead of round-tripping through a lossy numpy dtype map.
10611062
return coreai.pad(
10621063
x,
10631064
np.array(padding, dtype=np.uint32),

0 commit comments

Comments
 (0)