Skip to content

Commit 08d31d0

Browse files
superbobryGoogle-ML-Automation
authored andcommitted
[mosaic_gpu] Emit a slightly more informative error message in FragmentedArray._pointwise
PiperOrigin-RevId: 703504247
1 parent bae6600 commit 08d31d0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

jax/experimental/mosaic/gpu/fragmented_array.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,8 @@ def _pointwise(self, op, *other, output_is_signed: bool | None = None):
662662

663663
if isinstance(o.layout, WGSplatFragLayout):
664664
if not o.layout.can_broadcast_to(self.shape):
665-
raise ValueError("Can't broadcast shape.")
665+
raise ValueError(
666+
f"Cannot broadcast shape {self.shape} to layout {o.layout}")
666667
o = FragmentedArray.splat(
667668
o.registers.flat[0],
668669
shape=self.shape,

0 commit comments

Comments
 (0)