Revamp Cudnn RNN kernels for incoming autotune changes.
Revamp Cudnn RNN kernels for incoming autotune changes.

* Create DoForward() and DoBackward() to be used by fwd/bak kernels and later autotune.
* Simplify CudnnRnnForward Comupute() function. Offload the majority of its logic to other member functions.

PiperOrigin-RevId: 192848100

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