aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/compiler/jit
diff options
context:
space:
mode:
authorGravatar Derek Murray <mrry@google.com>2018-09-24 14:34:57 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-09-24 14:39:31 -0700
commitaab3c53e1484404a70565324d1231c4e6ead7425 (patch)
treeec04217c08795c7a30ee5bf7af86d7f2b81ec53c /tensorflow/compiler/jit
parent567a7196494a79988337bcb726c0c5d453298c99 (diff)
Inline kernel tracing logic into `ExecutorState::Process()`.
All devices implement the same tracing logic in an override of `Device::Compute()`. However, that logic does not have access to the cached `NodeItem::kernel_is_expensive` bit for the kernel, so it must make a virtual call to `OpKernel::IsExpensive()`. By inlining the logic into `ExecutorState::Process()`, we avoid making an unnecessary virtual call on each kernel invocation (when a trace controller is attached). PiperOrigin-RevId: 214332492
Diffstat (limited to 'tensorflow/compiler/jit')
-rw-r--r--tensorflow/compiler/jit/xla_device.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/tensorflow/compiler/jit/xla_device.cc b/tensorflow/compiler/jit/xla_device.cc
index 32fce2bf94..0824c4644e 100644
--- a/tensorflow/compiler/jit/xla_device.cc
+++ b/tensorflow/compiler/jit/xla_device.cc
@@ -373,7 +373,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();
- TracingDevice::Compute(op_kernel, context);
+ op_kernel->Compute(context);
}
void XlaDevice::ComputeAsync(AsyncOpKernel* op_kernel, OpKernelContext* context,