Skip to content

Commit 4aebe55

Browse files
Merge pull request #25538 from jakevdp:raise-runtimeerror
PiperOrigin-RevId: 707200618
2 parents 0fa5419 + 2518c62 commit 4aebe55

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

jax/_src/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1669,7 +1669,7 @@ def get_sharding(sharding, ndim):
16691669

16701670
context_mesh = mesh_lib.get_abstract_mesh()
16711671
if not context_mesh:
1672-
return RuntimeError("Please set the mesh via `jax.set_mesh` API.")
1672+
raise RuntimeError("Please set the mesh via `jax.set_mesh` API.")
16731673
assert sharding is None
16741674
return NamedSharding(context_mesh, P(*[None] * ndim))
16751675

0 commit comments

Comments
 (0)