aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/compiler/jit
diff options
context:
space:
mode:
authorGravatar Derek Murray <mrry@google.com>2018-08-26 22:31:25 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-08-26 22:35:39 -0700
commit7bccde15ce0dd29dce62092a5e9d48ffdc772963 (patch)
treea54909ae67b97bf03d57f47fa5750478de9609ae /tensorflow/compiler/jit
parent09792df012c22622324f085f46edde33006c7355 (diff)
Reduce the overhead of invoking an OpKernel when tracing is not enabled.
PiperOrigin-RevId: 210317627
Diffstat (limited to 'tensorflow/compiler/jit')
-rw-r--r--tensorflow/compiler/jit/xla_device.cc6
1 files changed, 1 insertions, 5 deletions
diff --git a/tensorflow/compiler/jit/xla_device.cc b/tensorflow/compiler/jit/xla_device.cc
index 70e6d0be0f..50c902fdfc 100644
--- a/tensorflow/compiler/jit/xla_device.cc
+++ b/tensorflow/compiler/jit/xla_device.cc
@@ -365,11 +365,7 @@ Status XlaDevice::FillContextMap(const Graph* graph,
void XlaDevice::Compute(OpKernel* op_kernel, OpKernelContext* context) {
VLOG(2) << "XlaDevice::Compute " << op_kernel->name() << ":"
<< op_kernel->type_string();
- // When Xprof profiling is off (which is the default), constructing the
- // activity is simple enough that its overhead is negligible.
- tracing::ScopedActivity activity(op_kernel->name(), op_kernel->type_string(),
- op_kernel->IsExpensive());
- op_kernel->Compute(context);
+ TracingDevice::Compute(op_kernel, context);
}
void XlaDevice::ComputeAsync(AsyncOpKernel* op_kernel, OpKernelContext* context,