[ROCm] Fix for the broken `--config=rocm` build
[ROCm] Fix for the broken `--config=rocm` build

The following PR/commit breaks the `--config=rocm` build

https://github.com/tensorflow/tensorflow/pull/30997

It introduces a declaration of the variable "data_layout" , within only the #else section of a #if-else block, and then adds a reference to "data_layout" outside of that #if-else block. Since the ROCm build takes #if path, the declaration for "data_layout" is missing, leading to the compile error on the reference to it.

The fix is add the corresponding declaration for "data_layout" in the #if section.

tensorflow/tensorflow-pywrap_saved_model,arborh/tensorflow,freedomtan/tensorflow,sarvex/tensorflow,ppwwyyxx/tensorflow,freedomtan/tensorflow,annarev/tensorflow,davidzchen/tensorflow,gunan/tensorflow,jhseu/tensorflow,Intel-tensorflow/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,renyi533/tensorflow,aam-at/tensorflow,aldian/tensorflow,frreiss/tensorflow-fred,aam-at/tensorflow,tensorflow/tensorflow,arborh/tensorflow,tensorflow/tensorflow,cxxgtxy/tensorflow,Intel-Corporation/tensorflow,aam-at/tensorflow,freedomtan/tensorflow,karllessard/tensorflow,frreiss/tensorflow-fred,yongtang/tensorflow,Intel-tensorflow/tensorflow,tensorflow/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,xzturn/tensorflow,Intel-tensorflow/tensorflow,aldian/tensorflow,renyi533/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,petewarden/tensorflow,karllessard/tensorflow,tensorflow/tensorflow,ppwwyyxx/tensorflow,adit-chandra/tensorflow,annarev/tensorflow,ppwwyyxx/tensorflow,ppwwyyxx/tensorflow,chemelnucfin/tensorflow,tensorflow/tensorflow,Intel-Corporation/tensorflow,petewarden/tensorflow,davidzchen/tensorflow,karllessard/tensorflow,cxxgtxy/tensorflow,Intel-Corporation/tensorflow,chemelnucfin/tensorflow,freedomtan/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,jhseu/tensorflow,DavidNorman/tensorflow,DavidNorman/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,arborh/tensorflow,DavidNorman/tensorflow,paolodedios/tensorflow,aam-at/tensorflow,ppwwyyxx/tensorflow,cxxgtxy/tensorflow,arborh/tensorflow,gunan/tensorflow,aldian/tensorflow,aam-at/tensorflow,petewarden/tensorflow,gautam1858/tensorflow,Intel-Corporation/tensorflow,davidzchen/tensorflow,annarev/tensorflow,jhseu/tensorflow,petewarden/tensorflow,paolodedios/tensorflow,jhseu/tensorflow,gunan/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,arborh/tensorflow,aam-at/tensorflow,adit-chandra/tensorflow,sarvex/tensorflow,xzturn/tensorflow,gautam1858/tensorflow,aam-at/tensorflow,annarev/tensorflow,freedomtan/tensorflow,yongtang/tensorflow,davidzchen/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow,petewarden/tensorflow,chemelnucfin/tensorflow,adit-chandra/tensorflow,renyi533/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,xzturn/tensorflow,tensorflow/tensorflow-pywrap_saved_model,aldian/tensorflow,annarev/tensorflow,cxxgtxy/tensorflow,freedomtan/tensorflow,arborh/tensorflow,ppwwyyxx/tensorflow,petewarden/tensorflow,adit-chandra/tensorflow,gautam1858/tensorflow,Intel-tensorflow/tensorflow,chemelnucfin/tensorflow,yongtang/tensorflow,jhseu/tensorflow,paolodedios/tensorflow,davidzchen/tensorflow,paolodedios/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,frreiss/tensorflow-fred,chemelnucfin/tensorflow,chemelnucfin/tensorflow,Intel-tensorflow/tensorflow,karllessard/tensorflow,aldian/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,frreiss/tensorflow-fred,frreiss/tensorflow-fred,xzturn/tensorflow,gautam1858/tensorflow,tensorflow/tensorflow-pywrap_saved_model,petewarden/tensorflow,Intel-tensorflow/tensorflow,xzturn/tensorflow,gunan/tensorflow,renyi533/tensorflow,freedomtan/tensorflow,davidzchen/tensorflow,renyi533/tensorflow,cxxgtxy/tensorflow,davidzchen/tensorflow,renyi533/tensorflow,tensorflow/tensorflow,aam-at/tensorflow,ppwwyyxx/tensorflow,frreiss/tensorflow-fred,tensorflow/tensorflow-pywrap_saved_model,paolodedios/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,cxxgtxy/tensorflow,gunan/tensorflow,karllessard/tensorflow,DavidNorman/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,gunan/tensorflow,karllessard/tensorflow,Intel-tensorflow/tensorflow,paolodedios/tensorflow,paolodedios/tensorflow,Intel-Corporation/tensorflow,DavidNorman/tensorflow,DavidNorman/tensorflow,freedomtan/tensorflow,gautam1858/tensorflow,freedomtan/tensorflow,yongtang/tensorflow,Intel-tensorflow/tensorflow,gunan/tensorflow,gautam1858/tensorflow,aam-at/tensorflow,yongtang/tensorflow,annarev/tensorflow,freedomtan/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,yongtang/tensorflow,adit-chandra/tensorflow,Intel-tensorflow/tensorflow,aam-at/tensorflow,xzturn/tensorflow,davidzchen/tensorflow,renyi533/tensorflow,davidzchen/tensorflow,sarvex/tensorflow,chemelnucfin/tensorflow,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-pywrap_saved_model,gunan/tensorflow,sarvex/tensorflow,chemelnucfin/tensorflow,gautam1858/tensorflow,arborh/tensorflow,sarvex/tensorflow,ppwwyyxx/tensorflow,tensorflow/tensorflow,adit-chandra/tensorflow,renyi533/tensorflow,gautam1858/tensorflow,ppwwyyxx/tensorflow,chemelnucfin/tensorflow,karllessard/tensorflow,DavidNorman/tensorflow,jhseu/tensorflow,annarev/tensorflow,arborh/tensorflow,aam-at/tensorflow,Intel-tensorflow/tensorflow,jhseu/tensorflow,annarev/tensorflow,annarev/tensorflow,karllessard/tensorflow,gautam1858/tensorflow,adit-chandra/tensorflow,arborh/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,yongtang/tensorflow,frreiss/tensorflow-fred,gautam1858/tensorflow,jhseu/tensorflow,cxxgtxy/tensorflow,jhseu/tensorflow,adit-chandra/tensorflow,yongtang/tensorflow,Intel-Corporation/tensorflow,petewarden/tensorflow,gunan/tensorflow,renyi533/tensorflow,davidzchen/tensorflow,yongtang/tensorflow,paolodedios/tensorflow,arborh/tensorflow,gautam1858/tensorflow,davidzchen/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,Intel-Corporation/tensorflow,renyi533/tensorflow,tensorflow/tensorflow,aldian/tensorflow,aldian/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,ppwwyyxx/tensorflow,tensorflow/tensorflow-pywrap_saved_model,karllessard/tensorflow,annarev/tensorflow,chemelnucfin/tensorflow,petewarden/tensorflow,paolodedios/tensorflow,DavidNorman/tensorflow,yongtang/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,aam-at/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,gunan/tensorflow,cxxgtxy/tensorflow,adit-chandra/tensorflow,paolodedios/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,renyi533/tensorflow,DavidNorman/tensorflow,karllessard/tensorflow,annarev/tensorflow,xzturn/tensorflow,petewarden/tensorflow,adit-chandra/tensorflow,gunan/tensorflow,xzturn/tensorflow,freedomtan/tensorflow,renyi533/tensorflow,frreiss/tensorflow-fred,petewarden/tensorflow,xzturn/tensorflow,sarvex/tensorflow,xzturn/tensorflow,Intel-Corporation/tensorflow,xzturn/tensorflow,tensorflow/tensorflow,arborh/tensorflow,DavidNorman/tensorflow,xzturn/tensorflow,gautam1858/tensorflow,tensorflow/tensorflow-pywrap_saved_model,petewarden/tensorflow,jhseu/tensorflow,adit-chandra/tensorflow,paolodedios/tensorflow,DavidNorman/tensorflow,gunan/tensorflow,chemelnucfin/tensorflow,tensorflow/tensorflow-pywrap_saved_model,yongtang/tensorflow,tensorflow/tensorflow-pywrap_saved_model,frreiss/tensorflow-fred,frreiss/tensorflow-fred,DavidNorman/tensorflow,ppwwyyxx/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow-pywrap_saved_model,Intel-tensorflow/tensorflow,ppwwyyxx/tensorflow,karllessard/tensorflow,aldian/tensorflow,jhseu/tensorflow,frreiss/tensorflow-fred,adit-chandra/tensorflow,davidzchen/tensorflow,freedomtan/tensorflow,jhseu/tensorflow,chemelnucfin/tensorflow,arborh/tensorflow,sarvex/tensorflow,sarvex/tensorflow,frreiss/tensorflow-fred