For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /max/get-started.md).
Python function
mesh_context
mesh_context()
max.experimental.sharding.mesh_context(mesh)
Publishes mesh to spec-first NamedMapping constructions.
JAX-style: when a NamedMapping is created without an explicit
mesh inside this block, it picks up mesh from this context and
resolves the spec against it.
with mesh_context(mesh):
model = Transformer(...) # all weights resolve against ``mesh``-
Parameters:
-
mesh (DeviceMesh)
-
Return type:
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!