[Executor] [NFC] Avoid touching the reference count when using a const tensor as input.
[Executor] [NFC] Avoid touching the reference count when using a const tensor as input.

This change extends the recent optimization for caching a constant output tensor from a kernel in the executor, which avoids dispatch overhead for kernels like `ConstOp`, `VarHandleOp`, etc. that always produce the same value. In this case, since the original kernel retains ownership of the tensor for at least as long as the executor is alive, there is no need to increment (and later decrement) the reference count for the underlying `TensorBuffer`, and we can avoid potentially expensive inter-core cache invalidations when those tensors are used concurrently (e.g. in inference).

PiperOrigin-RevId: 300083390
Change-Id: Ib667cb4efbdbd075ac8a43a3098dfb9f81961733

frreiss/tensorflow-fred,gautam1858/tensorflow,annarev/tensorflow,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-pywrap_saved_model,aam-at/tensorflow,sarvex/tensorflow,aam-at/tensorflow,yongtang/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,paolodedios/tensorflow,cxxgtxy/tensorflow,paolodedios/tensorflow,aldian/tensorflow,petewarden/tensorflow,aldian/tensorflow,Intel-tensorflow/tensorflow,xzturn/tensorflow,xzturn/tensorflow,petewarden/tensorflow,annarev/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,gunan/tensorflow,yongtang/tensorflow,yongtang/tensorflow,freedomtan/tensorflow,Intel-Corporation/tensorflow,annarev/tensorflow,karllessard/tensorflow,gunan/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,freedomtan/tensorflow,frreiss/tensorflow-fred,karllessard/tensorflow,karllessard/tensorflow,petewarden/tensorflow,tensorflow/tensorflow-pywrap_saved_model,gautam1858/tensorflow,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow,Intel-tensorflow/tensorflow,aldian/tensorflow,xzturn/tensorflow,davidzchen/tensorflow,cxxgtxy/tensorflow,cxxgtxy/tensorflow,Intel-Corporation/tensorflow,karllessard/tensorflow,gautam1858/tensorflow,aldian/tensorflow,aam-at/tensorflow,gautam1858/tensorflow,Intel-Corporation/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow-pywrap_saved_model,paolodedios/tensorflow,frreiss/tensorflow-fred,tensorflow/tensorflow-pywrap_saved_model,gautam1858/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow-experimental_link_static_libraries_once,aldian/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,aam-at/tensorflow,yongtang/tensorflow,aam-at/tensorflow,paolodedios/tensorflow,gunan/tensorflow,frreiss/tensorflow-fred,yongtang/tensorflow,karllessard/tensorflow,annarev/tensorflow,Intel-Corporation/tensorflow,aldian/tensorflow,Intel-tensorflow/tensorflow,gunan/tensorflow,davidzchen/tensorflow,aam-at/tensorflow,davidzchen/tensorflow,paolodedios/tensorflow,yongtang/tensorflow,gautam1858/tensorflow,gunan/tensorflow,cxxgtxy/tensorflow,sarvex/tensorflow,davidzchen/tensorflow,aldian/tensorflow,Intel-Corporation/tensorflow,freedomtan/tensorflow,annarev/tensorflow,freedomtan/tensorflow,sarvex/tensorflow,freedomtan/tensorflow,davidzchen/tensorflow,davidzchen/tensorflow,freedomtan/tensorflow,cxxgtxy/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,davidzchen/tensorflow,yongtang/tensorflow,gautam1858/tensorflow,sarvex/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow,petewarden/tensorflow,freedomtan/tensorflow,aam-at/tensorflow,tensorflow/tensorflow,yongtang/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,aam-at/tensorflow,yongtang/tensorflow,xzturn/tensorflow,frreiss/tensorflow-fred,gunan/tensorflow,gunan/tensorflow,xzturn/tensorflow,Intel-tensorflow/tensorflow,xzturn/tensorflow,tensorflow/tensorflow,gautam1858/tensorflow,tensorflow/tensorflow,Intel-tensorflow/tensorflow,davidzchen/tensorflow,petewarden/tensorflow,cxxgtxy/tensorflow,gunan/tensorflow,frreiss/tensorflow-fred,tensorflow/tensorflow-experimental_link_static_libraries_once,karllessard/tensorflow,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow,Intel-tensorflow/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,cxxgtxy/tensorflow,gunan/tensorflow,gautam1858/tensorflow,tensorflow/tensorflow,davidzchen/tensorflow,karllessard/tensorflow,frreiss/tensorflow-fred,gunan/tensorflow,gunan/tensorflow,petewarden/tensorflow,Intel-tensorflow/tensorflow,Intel-Corporation/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,freedomtan/tensorflow,petewarden/tensorflow,aldian/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,annarev/tensorflow,frreiss/tensorflow-fred,paolodedios/tensorflow,xzturn/tensorflow,gunan/tensorflow,gautam1858/tensorflow,Intel-tensorflow/tensorflow,xzturn/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,annarev/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,annarev/tensorflow,karllessard/tensorflow,karllessard/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,freedomtan/tensorflow,paolodedios/tensorflow,petewarden/tensorflow,tensorflow/tensorflow,Intel-tensorflow/tensorflow,karllessard/tensorflow,Intel-tensorflow/tensorflow,gautam1858/tensorflow,tensorflow/tensorflow-pywrap_saved_model,yongtang/tensorflow,petewarden/tensorflow,frreiss/tensorflow-fred,xzturn/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow-pywrap_tf_optimizer,paolodedios/tensorflow,frreiss/tensorflow-fred,paolodedios/tensorflow,freedomtan/tensorflow,xzturn/tensorflow,sarvex/tensorflow,gautam1858/tensorflow,sarvex/tensorflow,aam-at/tensorflow,yongtang/tensorflow,annarev/tensorflow,Intel-Corporation/tensorflow,davidzchen/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,freedomtan/tensorflow,paolodedios/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,sarvex/tensorflow,davidzchen/tensorflow,petewarden/tensorflow,tensorflow/tensorflow,tensorflow/tensorflow-pywrap_saved_model,aam-at/tensorflow,aam-at/tensorflow,sarvex/tensorflow,tensorflow/tensorflow-pywrap_saved_model,frreiss/tensorflow-fred,Intel-tensorflow/tensorflow,aam-at/tensorflow,annarev/tensorflow,xzturn/tensorflow,frreiss/tensorflow-fred,freedomtan/tensorflow,xzturn/tensorflow,tensorflow/tensorflow,karllessard/tensorflow,paolodedios/tensorflow,davidzchen/tensorflow,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-experimental_link_static_libraries_once,annarev/tensorflow,tensorflow/tensorflow,petewarden/tensorflow,Intel-Corporation/tensorflow,cxxgtxy/tensorflow,petewarden/tensorflow