We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 644eda6 commit 658ef16Copy full SHA for 658ef16
1 file changed
src/MaxText/sharding.py
@@ -85,7 +85,7 @@ def remove_size_one_mesh_axis(spec, mesh):
85
return None
86
new_spec = [] # type: ignore
87
for s in spec:
88
- if s is None:
+ if s is None or s == P.UNCONSTRAINED:
89
new_spec.append(s) # type: ignore
90
elif isinstance(s, tuple):
91
new_spec.append(tuple(i for i in s if mesh.shape[i] != 1))
0 commit comments