Add new helpers to HLO sharding.
Add new helpers to HLO sharding.

PiperOrigin-RevId: 189569053

brchiu/tensorflow,Intel-Corporation/tensorflow,gojira/tensorflow,jalexvig/tensorflow,adit-chandra/tensorflow,gojira/tensorflow,girving/tensorflow,brchiu/tensorflow,hfp/tensorflow-xsmm,nburn42/tensorflow,brchiu/tensorflow,snnn/tensorflow,Xeralux/tensorflow,Xeralux/tensorflow,jbedorf/tensorflow,DavidNorman/tensorflow,brchiu/tensorflow,jhseu/tensorflow,aselle/tensorflow,ppwwyyxx/tensorflow,petewarden/tensorflow,xzturn/tensorflow,theflofly/tensorflow,frreiss/tensorflow-fred,Intel-Corporation/tensorflow,Bismarrck/tensorflow,gautam1858/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,frreiss/tensorflow-fred,jalexvig/tensorflow,cxxgtxy/tensorflow,yongtang/tensorflow,kevin-coder/tensorflow-fork,ppwwyyxx/tensorflow,gojira/tensorflow,aldian/tensorflow,freedomtan/tensorflow,seanli9jan/tensorflow,sarvex/tensorflow,DavidNorman/tensorflow,dongjoon-hyun/tensorflow,aam-at/tensorflow,girving/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,Bismarrck/tensorflow,yanchen036/tensorflow,lukeiwanski/tensorflow,tensorflow/tensorflow-pywrap_saved_model,yanchen036/tensorflow,davidzchen/tensorflow,kobejean/tensorflow,aselle/tensorflow,Intel-tensorflow/tensorflow,ppwwyyxx/tensorflow,cxxgtxy/tensorflow,asimshankar/tensorflow,arborh/tensorflow,xzturn/tensorflow,yongtang/tensorflow,ZhangXinNan/tensorflow,frreiss/tensorflow-fred,ageron/tensorflow,brchiu/tensorflow,ppwwyyxx/tensorflow,arborh/tensorflow,annarev/tensorflow,jendap/tensorflow,hfp/tensorflow-xsmm,ghchinoy/tensorflow,ghchinoy/tensorflow,aselle/tensorflow,hehongliang/tensorflow,aam-at/tensorflow,drpngx/tensorflow,tensorflow/tensorflow-pywrap_saved_model,Xeralux/tensorflow,ZhangXinNan/tensorflow,brchiu/tensorflow,DavidNorman/tensorflow,aldian/tensorflow,freedomtan/tensorflow,apark263/tensorflow,jalexvig/tensorflow,paolodedios/tensorflow,adit-chandra/tensorflow,xzturn/tensorflow,theflofly/tensorflow,jbedorf/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,Intel-tensorflow/tensorflow,seanli9jan/tensorflow,yongtang/tensorflow,meteorcloudy/tensorflow,gunan/tensorflow,frreiss/tensorflow-fred,caisq/tensorflow,yanchen036/tensorflow,Intel-Corporation/tensorflow,petewarden/tensorflow,eaplatanios/tensorflow,Xeralux/tensorflow,tensorflow/tensorflow,seanli9jan/tensorflow,ZhangXinNan/tensorflow,kobejean/tensorflow,snnn/tensorflow,snnn/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,cxxgtxy/tensorflow,Intel-tensorflow/tensorflow,ZhangXinNan/tensorflow,ghchinoy/tensorflow,renyi533/tensorflow,xodus7/tensorflow,arborh/tensorflow,kobejean/tensorflow,seanli9jan/tensorflow,xzturn/tensorflow,dancingdan/tensorflow,alsrgv/tensorflow,xzturn/tensorflow,dongjoon-hyun/tensorflow,drpngx/tensorflow,apark263/tensorflow,petewarden/tensorflow,girving/tensorflow,annarev/tensorflow,allenlavoie/tensorflow,aam-at/tensorflow,tensorflow/tensorflow-pywrap_saved_model,Bismarrck/tensorflow,apark263/tensorflow,dancingdan/tensorflow,cxxgtxy/tensorflow,paolodedios/tensorflow,sarvex/tensorflow,xodus7/tensorflow,tensorflow/tensorflow,ZhangXinNan/tensorflow,brchiu/tensorflow,kobejean/tensorflow,sarvex/tensorflow,renyi533/tensorflow,lukeiwanski/tensorflow,renyi533/tensorflow,Bismarrck/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,girving/tensorflow,theflofly/tensorflow,renyi533/tensorflow,dancingdan/tensorflow,gunan/tensorflow,xodus7/tensorflow,Xeralux/tensorflow,adit-chandra/tensorflow,kevin-coder/tensorflow-fork,ghchinoy/tensorflow,karllessard/tensorflow,gojira/tensorflow,apark263/tensorflow,caisq/tensorflow,theflofly/tensorflow,nburn42/tensorflow,Bismarrck/tensorflow,asimshankar/tensorflow,freedomtan/tensorflow,jhseu/tensorflow,drpngx/tensorflow,hfp/tensorflow-xsmm,Intel-tensorflow/tensorflow,DavidNorman/tensorflow,alsrgv/tensorflow,jart/tensorflow,dendisuhubdy/tensorflow,ageron/tensorflow,dendisuhubdy/tensorflow,jbedorf/tensorflow,snnn/tensorflow,alsrgv/tensorflow,kevin-coder/tensorflow-fork,karllessard/tensorflow,gunan/tensorflow,ageron/tensorflow,theflofly/tensorflow,hehongliang/tensorflow,adit-chandra/tensorflow,xzturn/tensorflow,annarev/tensorflow,davidzchen/tensorflow,AnishShah/tensorflow,ageron/tensorflow,davidzchen/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,gunan/tensorflow,gojira/tensorflow,ageron/tensorflow,aldian/tensorflow,jbedorf/tensorflow,aam-at/tensorflow,DavidNorman/tensorflow,chemelnucfin/tensorflow,nburn42/tensorflow,yongtang/tensorflow,drpngx/tensorflow,karllessard/tensorflow,ghchinoy/tensorflow,karllessard/tensorflow,eaplatanios/tensorflow,AnishShah/tensorflow,AnishShah/tensorflow,gunan/tensorflow,jhseu/tensorflow,petewarden/tensorflow,sarvex/tensorflow,hfp/tensorflow-xsmm,Intel-tensorflow/tensorflow,allenlavoie/tensorflow,allenlavoie/tensorflow,AnishShah/tensorflow,alshedivat/tensorflow,gautam1858/tensorflow,dancingdan/tensorflow,jendap/tensorflow,hehongliang/tensorflow,renyi533/tensorflow,paolodedios/tensorflow,Intel-Corporation/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,xodus7/tensorflow,caisq/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,paolodedios/tensorflow,eaplatanios/tensorflow,ageron/tensorflow,ZhangXinNan/tensorflow,dongjoon-hyun/tensorflow,annarev/tensorflow,renyi533/tensorflow,jalexvig/tensorflow,dendisuhubdy/tensorflow,seanli9jan/tensorflow,gunan/tensorflow,alsrgv/tensorflow,tensorflow/tensorflow,arborh/tensorflow,hehongliang/tensorflow,arborh/tensorflow,yongtang/tensorflow,kevin-coder/tensorflow-fork,gautam1858/tensorflow,xodus7/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,seanli9jan/tensorflow,davidzchen/tensorflow,brchiu/tensorflow,cxxgtxy/tensorflow,ZhangXinNan/tensorflow,aam-at/tensorflow,alshedivat/tensorflow,aselle/tensorflow,jhseu/tensorflow,ghchinoy/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,arborh/tensorflow,AnishShah/tensorflow,petewarden/tensorflow,karllessard/tensorflow,apark263/tensorflow,seanli9jan/tensorflow,gautam1858/tensorflow,cxxgtxy/tensorflow,chemelnucfin/tensorflow,theflofly/tensorflow,Bismarrck/tensorflow,jendap/tensorflow,petewarden/tensorflow,petewarden/tensorflow,gautam1858/tensorflow,meteorcloudy/tensorflow,nburn42/tensorflow,arborh/tensorflow,tensorflow/tensorflow,aselle/tensorflow,paolodedios/tensorflow,jhseu/tensorflow,hehongliang/tensorflow,ageron/tensorflow,ZhangXinNan/tensorflow,dongjoon-hyun/tensorflow,caisq/tensorflow,annarev/tensorflow,snnn/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,benoitsteiner/tensorflow-xsmm,yongtang/tensorflow,renyi533/tensorflow,jalexvig/tensorflow,seanli9jan/tensorflow,Intel-tensorflow/tensorflow,aldian/tensorflow,petewarden/tensorflow,tensorflow/tensorflow,davidzchen/tensorflow,paolodedios/tensorflow,lukeiwanski/tensorflow,jart/tensorflow,karllessard/tensorflow,petewarden/tensorflow,sarvex/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,benoitsteiner/tensorflow-xsmm,girving/tensorflow,jbedorf/tensorflow,jbedorf/tensorflow,dongjoon-hyun/tensorflow,gautam1858/tensorflow,meteorcloudy/tensorflow,frreiss/tensorflow-fred,adit-chandra/tensorflow,drpngx/tensorflow,tensorflow/tensorflow,hfp/tensorflow-xsmm,gautam1858/tensorflow,gojira/tensorflow,adit-chandra/tensorflow,aldian/tensorflow,jart/tensorflow,snnn/tensorflow,Xeralux/tensorflow,asimshankar/tensorflow,apark263/tensorflow,allenlavoie/tensorflow,jalexvig/tensorflow,aldian/tensorflow,petewarden/tensorflow,aam-at/tensorflow,manipopopo/tensorflow,meteorcloudy/tensorflow,aselle/tensorflow,hfp/tensorflow-xsmm,snnn/tensorflow,adit-chandra/tensorflow,jart/tensorflow,ageron/tensorflow,theflofly/tensorflow,alshedivat/tensorflow,kobejean/tensorflow,drpngx/tensorflow,snnn/tensorflow,freedomtan/tensorflow,manipopopo/tensorflow,hehongliang/tensorflow,kobejean/tensorflow,aam-at/tensorflow,jalexvig/tensorflow,tensorflow/tensorflow-pywrap_saved_model,snnn/tensorflow,DavidNorman/tensorflow,AnishShah/tensorflow,tensorflow/tensorflow-pywrap_saved_model,lukeiwanski/tensorflow,nburn42/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,lukeiwanski/tensorflow,ZhangXinNan/tensorflow,lukeiwanski/tensorflow,dendisuhubdy/tensorflow,ageron/tensorflow,gunan/tensorflow,DavidNorman/tensorflow,snnn/tensorflow,xzturn/tensorflow,gojira/tensorflow,lukeiwanski/tensorflow,jendap/tensorflow,dancingdan/tensorflow,kobejean/tensorflow,annarev/tensorflow,aam-at/tensorflow,chemelnucfin/tensorflow,Intel-tensorflow/tensorflow,tensorflow/tensorflow,DavidNorman/tensorflow,xzturn/tensorflow,paolodedios/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,gojira/tensorflow,xzturn/tensorflow,eaplatanios/tensorflow,lukeiwanski/tensorflow,tensorflow/tensorflow-pywrap_saved_model,jendap/tensorflow,ppwwyyxx/tensorflow,jart/tensorflow,ppwwyyxx/tensorflow,petewarden/tensorflow,ghchinoy/tensorflow,theflofly/tensorflow,sarvex/tensorflow,allenlavoie/tensorflow,gunan/tensorflow,ZhangXinNan/tensorflow,jendap/tensorflow,brchiu/tensorflow,apark263/tensorflow,alshedivat/tensorflow,caisq/tensorflow,manipopopo/tensorflow,dongjoon-hyun/tensorflow,arborh/tensorflow,jendap/tensorflow,benoitsteiner/tensorflow-xsmm,theflofly/tensorflow,DavidNorman/tensorflow,Bismarrck/tensorflow,AnishShah/tensorflow,Intel-tensorflow/tensorflow,allenlavoie/tensorflow,davidzchen/tensorflow,kobejean/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,frreiss/tensorflow-fred,benoitsteiner/tensorflow-xsmm,xodus7/tensorflow,karllessard/tensorflow,jart/tensorflow,theflofly/tensorflow,brchiu/tensorflow,asimshankar/tensorflow,chemelnucfin/tensorflow,adit-chandra/tensorflow,gojira/tensorflow,tensorflow/tensorflow-pywrap_saved_model,jhseu/tensorflow,freedomtan/tensorflow,Intel-tensorflow/tensorflow,renyi533/tensorflow,xodus7/tensorflow,benoitsteiner/tensorflow-xsmm,nburn42/tensorflow,aam-at/tensorflow,aldian/tensorflow,gautam1858/tensorflow,kevin-coder/tensorflow-fork,yanchen036/tensorflow,jhseu/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,chemelnucfin/tensorflow,cxxgtxy/tensorflow,eaplatanios/tensorflow,davidzchen/tensorflow,jhseu/tensorflow,kobejean/tensorflow,hfp/tensorflow-xsmm,tensorflow/tensorflow-experimental_link_static_libraries_once,aselle/tensorflow,tensorflow/tensorflow,alsrgv/tensorflow,asimshankar/tensorflow,ZhangXinNan/tensorflow,dendisuhubdy/tensorflow,snnn/tensorflow,kevin-coder/tensorflow-fork,alsrgv/tensorflow,xzturn/tensorflow,freedomtan/tensorflow,yongtang/tensorflow,dendisuhubdy/tensorflow,allenlavoie/tensorflow,xodus7/tensorflow,dendisuhubdy/tensorflow,dancingdan/tensorflow,tensorflow/tensorflow,Intel-Corporation/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,ageron/tensorflow,yongtang/tensorflow,alsrgv/tensorflow,jbedorf/tensorflow,lukeiwanski/tensorflow,asimshankar/tensorflow,frreiss/tensorflow-fred,alshedivat/tensorflow,renyi533/tensorflow,benoitsteiner/tensorflow-xsmm,aam-at/tensorflow,arborh/tensorflow,asimshankar/tensorflow,Xeralux/tensorflow,kobejean/tensorflow,alsrgv/tensorflow,manipopopo/tensorflow,gunan/tensorflow,meteorcloudy/tensorflow,davidzchen/tensorflow,AnishShah/tensorflow,apark263/tensorflow,girving/tensorflow,gojira/tensorflow,Bismarrck/tensorflow,aselle/tensorflow,jbedorf/tensorflow,davidzchen/tensorflow,benoitsteiner/tensorflow-xsmm,hfp/tensorflow-xsmm,caisq/tensorflow,frreiss/tensorflow-fred,lukeiwanski/tensorflow,apark263/tensorflow,ageron/tensorflow,ppwwyyxx/tensorflow,sarvex/tensorflow,eaplatanios/tensorflow,alshedivat/tensorflow,manipopopo/tensorflow,gautam1858/tensorflow,chemelnucfin/tensorflow,alshedivat/tensorflow,seanli9jan/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,Xeralux/tensorflow,tensorflow/tensorflow-pywrap_saved_model,jendap/tensorflow,jendap/tensorflow,meteorcloudy/tensorflow,girving/tensorflow,adit-chandra/tensorflow,gautam1858/tensorflow,adit-chandra/tensorflow,jhseu/tensorflow,dongjoon-hyun/tensorflow,annarev/tensorflow,alshedivat/tensorflow,chemelnucfin/tensorflow,Bismarrck/tensorflow,dancingdan/tensorflow,frreiss/tensorflow-fred,Bismarrck/tensorflow,jart/tensorflow,paolodedios/tensorflow,theflofly/tensorflow,tensorflow/tensorflow-pywrap_saved_model,renyi533/tensorflow,paolodedios/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow,kobejean/tensorflow,manipopopo/tensorflow,aselle/tensorflow,asimshankar/tensorflow,allenlavoie/tensorflow,benoitsteiner/tensorflow-xsmm,annarev/tensorflow,yongtang/tensorflow,xodus7/tensorflow,ghchinoy/tensorflow,seanli9jan/tensorflow,asimshankar/tensorflow,kevin-coder/tensorflow-fork,apark263/tensorflow,yanchen036/tensorflow,tensorflow/tensorflow,jbedorf/tensorflow,dancingdan/tensorflow,davidzchen/tensorflow,DavidNorman/tensorflow,yongtang/tensorflow,yanchen036/tensorflow,meteorcloudy/tensorflow,sarvex/tensorflow,Xeralux/tensorflow,AnishShah/tensorflow,Bismarrck/tensorflow,Xeralux/tensorflow,drpngx/tensorflow,jhseu/tensorflow,girving/tensorflow,allenlavoie/tensorflow,karllessard/tensorflow,dongjoon-hyun/tensorflow,hehongliang/tensorflow,manipopopo/tensorflow,petewarden/tensorflow,frreiss/tensorflow-fred,yongtang/tensorflow,AnishShah/tensorflow,jalexvig/tensorflow,cxxgtxy/tensorflow,hfp/tensorflow-xsmm,karllessard/tensorflow,ppwwyyxx/tensorflow,gunan/tensorflow,alshedivat/tensorflow,yanchen036/tensorflow,caisq/tensorflow,ageron/tensorflow,eaplatanios/tensorflow,benoitsteiner/tensorflow-xsmm,chemelnucfin/tensorflow,dancingdan/tensorflow,freedomtan/tensorflow,renyi533/tensorflow,adit-chandra/tensorflow,davidzchen/tensorflow,jalexvig/tensorflow,alsrgv/tensorflow,freedomtan/tensorflow,dongjoon-hyun/tensorflow,manipopopo/tensorflow,freedomtan/tensorflow,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-experimental_link_static_libraries_once,arborh/tensorflow,ppwwyyxx/tensorflow,frreiss/tensorflow-fred,freedomtan/tensorflow,caisq/tensorflow,benoitsteiner/tensorflow-xsmm,karllessard/tensorflow,xodus7/tensorflow,jhseu/tensorflow,chemelnucfin/tensorflow,DavidNorman/tensorflow,dendisuhubdy/tensorflow,jbedorf/tensorflow,gunan/tensorflow,alshedivat/tensorflow,dendisuhubdy/tensorflow,manipopopo/tensorflow,Intel-tensorflow/tensorflow,eaplatanios/tensorflow,adit-chandra/tensorflow,aselle/tensorflow,asimshankar/tensorflow,jart/tensorflow,chemelnucfin/tensorflow,gunan/tensorflow,meteorcloudy/tensorflow,alsrgv/tensorflow,girving/tensorflow,jalexvig/tensorflow,hfp/tensorflow-xsmm,Intel-Corporation/tensorflow,chemelnucfin/tensorflow,brchiu/tensorflow,kevin-coder/tensorflow-fork,xodus7/tensorflow,girving/tensorflow,alshedivat/tensorflow,ghchinoy/tensorflow,girving/tensorflow,benoitsteiner/tensorflow-xsmm,nburn42/tensorflow,caisq/tensorflow,jart/tensorflow,gautam1858/tensorflow,chemelnucfin/tensorflow,annarev/tensorflow,meteorcloudy/tensorflow,theflofly/tensorflow,jhseu/tensorflow,Intel-Corporation/tensorflow,frreiss/tensorflow-fred,seanli9jan/tensorflow,jart/tensorflow,drpngx/tensorflow,DavidNorman/tensorflow,jalexvig/tensorflow,asimshankar/tensorflow,nburn42/tensorflow,allenlavoie/tensorflow,Intel-Corporation/tensorflow,ghchinoy/tensorflow,Intel-tensorflow/tensorflow,eaplatanios/tensorflow,dongjoon-hyun/tensorflow,paolodedios/tensorflow,hfp/tensorflow-xsmm,annarev/tensorflow,gojira/tensorflow,eaplatanios/tensorflow,gautam1858/tensorflow,ghchinoy/tensorflow,dancingdan/tensorflow,drpngx/tensorflow,aselle/tensorflow,Xeralux/tensorflow,xzturn/tensorflow,nburn42/tensorflow,ppwwyyxx/tensorflow,tensorflow/tensorflow-pywrap_saved_model,ghchinoy/tensorflow,apark263/tensorflow,manipopopo/tensorflow,manipopopo/tensorflow,aam-at/tensorflow,kevin-coder/tensorflow-fork,jendap/tensorflow,meteorcloudy/tensorflow,kevin-coder/tensorflow-fork,annarev/tensorflow,jbedorf/tensorflow,eaplatanios/tensorflow,paolodedios/tensorflow,freedomtan/tensorflow,kevin-coder/tensorflow-fork,jbedorf/tensorflow,arborh/tensorflow,xzturn/tensorflow,ppwwyyxx/tensorflow,nburn42/tensorflow,jendap/tensorflow,AnishShah/tensorflow,alsrgv/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,allenlavoie/tensorflow,arborh/tensorflow,alsrgv/tensorflow,dongjoon-hyun/tensorflow,caisq/tensorflow,yanchen036/tensorflow,dendisuhubdy/tensorflow,karllessard/tensorflow,aam-at/tensorflow,renyi533/tensorflow,drpngx/tensorflow,dancingdan/tensorflow,nburn42/tensorflow,ppwwyyxx/tensorflow,freedomtan/tensorflow,aldian/tensorflow,davidzchen/tensorflow