Skip to content

Commit f7bbf14

Browse files
judyzhaoxinwucamiloCienet
authored andcommitted
Test fix using jax.lax.reshard
1 parent bd82361 commit f7bbf14

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

axlearn/common/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,7 @@ def with_sharding_constraint(x: Tensor, shardings):
643643
logging.warning("with_sharding_constraint failed: %s. Try to re-shard.", e)
644644
if "reshard" in str(e) or "Explicit" in str(e):
645645
named_sharding = jax.sharding.NamedSharding(mesh, shardings)
646-
return jax.device_put(x, named_sharding)
646+
return jax.lax.reshard(x, named_sharding)
647647
raise e
648648

649649

0 commit comments

Comments
 (0)