Consider all prefixes of a tensor sharding so that largest available prefix can be assigned to factors.
For example, if factor i has [x,y] and [x,z] shardings, and both [y] and [z] are used by other factors, factor i should be able to get assigned to [x] even though neither [x,y] nor [x,z] is available.
Consider all prefixes of a tensor sharding so that largest available prefix can be assigned to factors.
For example, if factor i has [x,y] and [x,z] shardings, and both [y] and [z] are used by other factors, factor i should be able to get assigned to [x] even though neither [x,y] nor [x,z] is available.