mesh
mesh copied to clipboard
Regarding change in code that will convert layout to use both model and data parallelism
mesh_shape = [("processor_rows", 2), ("processor_cols", 2)] layout_rules = [("batch", "processor_rows"), ("hidden", "processor_cols")]
The above code change is mentioned to be using both model and data parallelism. But we will get "mesh_size error". So we need to change the value for mesh_size also. It should be *mesh_size=len(mesh_shape)len(mesh_shape[0])