[XLA] Don't re-seed RNG on every call to HloEvaluator::Evaluate.
[XLA] Don't re-seed RNG on every call to HloEvaluator::Evaluate.

Some tests -- in particular, tests that do reductions and so invoke a small
subcomputation many times -- invoke HloEvaluator::Evaluate() many times.
Previously, each such invocation was creating an std::random_device.

Creating std::random_device is very expensive -- it touches /dev/urandom and so
on.  This was creating a lot of overhead (25%+) in these tests.  So instead, we
do it only once, and do a simple atomic op to generate new seeds.

PiperOrigin-RevId: 228963974

davidzchen/tensorflow,jendap/tensorflow,karllessard/tensorflow,Intel-tensorflow/tensorflow,alsrgv/tensorflow,renyi533/tensorflow,apark263/tensorflow,jhseu/tensorflow,paolodedios/tensorflow,frreiss/tensorflow-fred,tensorflow/tensorflow-pywrap_tf_optimizer,kevin-coder/tensorflow-fork,freedomtan/tensorflow,ppwwyyxx/tensorflow,adit-chandra/tensorflow,jhseu/tensorflow,aldian/tensorflow,arborh/tensorflow,tensorflow/tensorflow,aldian/tensorflow,gautam1858/tensorflow,xzturn/tensorflow,Intel-tensorflow/tensorflow,jhseu/tensorflow,gunan/tensorflow,apark263/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow-experimental_link_static_libraries_once,jhseu/tensorflow,yongtang/tensorflow,apark263/tensorflow,ageron/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,DavidNorman/tensorflow,annarev/tensorflow,aldian/tensorflow,aldian/tensorflow,frreiss/tensorflow-fred,theflofly/tensorflow,ageron/tensorflow,yongtang/tensorflow,gautam1858/tensorflow,xzturn/tensorflow,renyi533/tensorflow,paolodedios/tensorflow,ppwwyyxx/tensorflow,kevin-coder/tensorflow-fork,ageron/tensorflow,Intel-Corporation/tensorflow,DavidNorman/tensorflow,DavidNorman/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,aam-at/tensorflow,renyi533/tensorflow,yongtang/tensorflow,alsrgv/tensorflow,frreiss/tensorflow-fred,theflofly/tensorflow,aam-at/tensorflow,paolodedios/tensorflow,renyi533/tensorflow,chemelnucfin/tensorflow,gunan/tensorflow,theflofly/tensorflow,renyi533/tensorflow,arborh/tensorflow,ageron/tensorflow,cxxgtxy/tensorflow,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow-pywrap_tf_optimizer,paolodedios/tensorflow,gunan/tensorflow,xzturn/tensorflow,theflofly/tensorflow,apark263/tensorflow,chemelnucfin/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,yongtang/tensorflow,ghchinoy/tensorflow,arborh/tensorflow,petewarden/tensorflow,Intel-Corporation/tensorflow,petewarden/tensorflow,ageron/tensorflow,ghchinoy/tensorflow,petewarden/tensorflow,cxxgtxy/tensorflow,yongtang/tensorflow,petewarden/tensorflow,DavidNorman/tensorflow,tensorflow/tensorflow,tensorflow/tensorflow-pywrap_saved_model,Intel-Corporation/tensorflow,frreiss/tensorflow-fred,aam-at/tensorflow,theflofly/tensorflow,chemelnucfin/tensorflow,ppwwyyxx/tensorflow,annarev/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,jendap/tensorflow,apark263/tensorflow,ghchinoy/tensorflow,tensorflow/tensorflow-pywrap_saved_model,theflofly/tensorflow,adit-chandra/tensorflow,DavidNorman/tensorflow,theflofly/tensorflow,arborh/tensorflow,theflofly/tensorflow,karllessard/tensorflow,jendap/tensorflow,gautam1858/tensorflow,gunan/tensorflow,jbedorf/tensorflow,jhseu/tensorflow,cxxgtxy/tensorflow,tensorflow/tensorflow-pywrap_saved_model,paolodedios/tensorflow,davidzchen/tensorflow,gautam1858/tensorflow,adit-chandra/tensorflow,DavidNorman/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,alsrgv/tensorflow,kevin-coder/tensorflow-fork,freedomtan/tensorflow,karllessard/tensorflow,tensorflow/tensorflow,karllessard/tensorflow,sarvex/tensorflow,petewarden/tensorflow,paolodedios/tensorflow,xzturn/tensorflow,gunan/tensorflow,davidzchen/tensorflow,arborh/tensorflow,adit-chandra/tensorflow,adit-chandra/tensorflow,jbedorf/tensorflow,aam-at/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow-experimental_link_static_libraries_once,annarev/tensorflow,Intel-Corporation/tensorflow,jendap/tensorflow,karllessard/tensorflow,chemelnucfin/tensorflow,renyi533/tensorflow,petewarden/tensorflow,renyi533/tensorflow,renyi533/tensorflow,gautam1858/tensorflow,ppwwyyxx/tensorflow,gautam1858/tensorflow,annarev/tensorflow,adit-chandra/tensorflow,ghchinoy/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,jendap/tensorflow,karllessard/tensorflow,jhseu/tensorflow,annarev/tensorflow,petewarden/tensorflow,tensorflow/tensorflow-pywrap_saved_model,renyi533/tensorflow,jendap/tensorflow,petewarden/tensorflow,annarev/tensorflow,gunan/tensorflow,Intel-tensorflow/tensorflow,kevin-coder/tensorflow-fork,Intel-tensorflow/tensorflow,renyi533/tensorflow,tensorflow/tensorflow-pywrap_saved_model,freedomtan/tensorflow,annarev/tensorflow,alsrgv/tensorflow,DavidNorman/tensorflow,karllessard/tensorflow,davidzchen/tensorflow,frreiss/tensorflow-fred,tensorflow/tensorflow,paolodedios/tensorflow,jendap/tensorflow,cxxgtxy/tensorflow,ageron/tensorflow,jbedorf/tensorflow,jhseu/tensorflow,ageron/tensorflow,apark263/tensorflow,jbedorf/tensorflow,ppwwyyxx/tensorflow,aam-at/tensorflow,alsrgv/tensorflow,ghchinoy/tensorflow,yongtang/tensorflow,xzturn/tensorflow,alsrgv/tensorflow,davidzchen/tensorflow,davidzchen/tensorflow,ghchinoy/tensorflow,yongtang/tensorflow,kevin-coder/tensorflow-fork,jbedorf/tensorflow,annarev/tensorflow,yongtang/tensorflow,ghchinoy/tensorflow,Intel-Corporation/tensorflow,chemelnucfin/tensorflow,freedomtan/tensorflow,DavidNorman/tensorflow,alsrgv/tensorflow,sarvex/tensorflow,karllessard/tensorflow,arborh/tensorflow,ppwwyyxx/tensorflow,tensorflow/tensorflow,gautam1858/tensorflow,xzturn/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,paolodedios/tensorflow,aam-at/tensorflow,apark263/tensorflow,aam-at/tensorflow,adit-chandra/tensorflow,frreiss/tensorflow-fred,tensorflow/tensorflow-pywrap_tf_optimizer,sarvex/tensorflow,alsrgv/tensorflow,frreiss/tensorflow-fred,jhseu/tensorflow,Intel-tensorflow/tensorflow,gautam1858/tensorflow,ppwwyyxx/tensorflow,ageron/tensorflow,chemelnucfin/tensorflow,petewarden/tensorflow,tensorflow/tensorflow-pywrap_saved_model,cxxgtxy/tensorflow,gunan/tensorflow,arborh/tensorflow,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow-experimental_link_static_libraries_once,frreiss/tensorflow-fred,xzturn/tensorflow,tensorflow/tensorflow,petewarden/tensorflow,tensorflow/tensorflow-pywrap_saved_model,sarvex/tensorflow,ageron/tensorflow,Intel-tensorflow/tensorflow,DavidNorman/tensorflow,cxxgtxy/tensorflow,aldian/tensorflow,freedomtan/tensorflow,jhseu/tensorflow,annarev/tensorflow,gautam1858/tensorflow,Intel-Corporation/tensorflow,kevin-coder/tensorflow-fork,gunan/tensorflow,gunan/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,jbedorf/tensorflow,gunan/tensorflow,ppwwyyxx/tensorflow,tensorflow/tensorflow,jbedorf/tensorflow,Intel-Corporation/tensorflow,alsrgv/tensorflow,tensorflow/tensorflow,karllessard/tensorflow,jbedorf/tensorflow,sarvex/tensorflow,freedomtan/tensorflow,cxxgtxy/tensorflow,kevin-coder/tensorflow-fork,cxxgtxy/tensorflow,yongtang/tensorflow,gautam1858/tensorflow,annarev/tensorflow,xzturn/tensorflow,sarvex/tensorflow,adit-chandra/tensorflow,freedomtan/tensorflow,paolodedios/tensorflow,aldian/tensorflow,frreiss/tensorflow-fred,ghchinoy/tensorflow,freedomtan/tensorflow,chemelnucfin/tensorflow,ppwwyyxx/tensorflow,aam-at/tensorflow,jbedorf/tensorflow,apark263/tensorflow,frreiss/tensorflow-fred,tensorflow/tensorflow-pywrap_saved_model,jendap/tensorflow,davidzchen/tensorflow,xzturn/tensorflow,karllessard/tensorflow,renyi533/tensorflow,kevin-coder/tensorflow-fork,aam-at/tensorflow,petewarden/tensorflow,ghchinoy/tensorflow,jhseu/tensorflow,DavidNorman/tensorflow,annarev/tensorflow,yongtang/tensorflow,aam-at/tensorflow,apark263/tensorflow,Intel-tensorflow/tensorflow,davidzchen/tensorflow,frreiss/tensorflow-fred,ppwwyyxx/tensorflow,arborh/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow,apark263/tensorflow,gautam1858/tensorflow,ageron/tensorflow,tensorflow/tensorflow,ghchinoy/tensorflow,aam-at/tensorflow,aldian/tensorflow,arborh/tensorflow,aam-at/tensorflow,chemelnucfin/tensorflow,karllessard/tensorflow,davidzchen/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,alsrgv/tensorflow,chemelnucfin/tensorflow,arborh/tensorflow,apark263/tensorflow,adit-chandra/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,kevin-coder/tensorflow-fork,jbedorf/tensorflow,jhseu/tensorflow,Intel-tensorflow/tensorflow,petewarden/tensorflow,ghchinoy/tensorflow,freedomtan/tensorflow,kevin-coder/tensorflow-fork,xzturn/tensorflow,gunan/tensorflow,paolodedios/tensorflow,paolodedios/tensorflow,davidzchen/tensorflow,chemelnucfin/tensorflow,davidzchen/tensorflow,DavidNorman/tensorflow,kevin-coder/tensorflow-fork,jendap/tensorflow,chemelnucfin/tensorflow,tensorflow/tensorflow-pywrap_saved_model,ageron/tensorflow,theflofly/tensorflow,Intel-tensorflow/tensorflow,ppwwyyxx/tensorflow,jhseu/tensorflow,ghchinoy/tensorflow,jendap/tensorflow,xzturn/tensorflow,tensorflow/tensorflow,arborh/tensorflow,arborh/tensorflow,aldian/tensorflow,jbedorf/tensorflow,DavidNorman/tensorflow,jbedorf/tensorflow,gautam1858/tensorflow,adit-chandra/tensorflow,jendap/tensorflow,adit-chandra/tensorflow,frreiss/tensorflow-fred,sarvex/tensorflow,renyi533/tensorflow,xzturn/tensorflow,alsrgv/tensorflow,freedomtan/tensorflow,freedomtan/tensorflow,ageron/tensorflow,yongtang/tensorflow,sarvex/tensorflow,gunan/tensorflow,adit-chandra/tensorflow,ppwwyyxx/tensorflow,theflofly/tensorflow,Intel-Corporation/tensorflow,alsrgv/tensorflow,freedomtan/tensorflow,Intel-tensorflow/tensorflow,theflofly/tensorflow,davidzchen/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,Intel-tensorflow/tensorflow,theflofly/tensorflow,chemelnucfin/tensorflow