Error out if user provided num_shards is incorrect for non-model-parallelism case.
Error out if user provided num_shards is incorrect for non-model-parallelism case.

PiperOrigin-RevId: 185780685

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