Skip to content

What are the differences between mesh_utils.create_device_mesh and np.array(devices).reshape for sharding an array? #20693

Answered by jakevdp
yixiaoer asked this question in General
Discussion options

You must be logged in to vote

The mesh_utils version takes into account the hardware geometry, and will result in a mesh with a more efficient layout for the particular hardware you are running on. For this reason you should use mesh_utils rather than constructing a mesh manually from the ordered list of devices.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by yixiaoer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants