aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/common_runtime/sycl
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2018-04-30 04:21:09 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-04-30 04:23:46 -0700
commit914796d5e9bc7b0c619b53c7eb24cfe7d6c7fb9b (patch)
tree17a2ec7b1a0902ebaf25451a418825e834e57571 /tensorflow/core/common_runtime/sycl
parentc2186af6c28f8817122b27f0cd29e16daeae68f1 (diff)
Cleaning up tracing code.
PiperOrigin-RevId: 194768567
Diffstat (limited to 'tensorflow/core/common_runtime/sycl')
-rw-r--r--tensorflow/core/common_runtime/sycl/sycl_device.cc11
1 files changed, 5 insertions, 6 deletions
diff --git a/tensorflow/core/common_runtime/sycl/sycl_device.cc b/tensorflow/core/common_runtime/sycl/sycl_device.cc
index 6e1a45b3ef..f3bd72f697 100644
--- a/tensorflow/core/common_runtime/sycl/sycl_device.cc
+++ b/tensorflow/core/common_runtime/sycl/sycl_device.cc
@@ -27,12 +27,11 @@ SYCLDevice::~SYCLDevice() {}
void SYCLDevice::Compute(OpKernel* op_kernel, OpKernelContext* context) {
assert(context);
- if (port::Tracing::IsActive()) {
- // TODO(pbar) We really need a useful identifier of the graph node.
- const uint64 id = Hash64(op_kernel->name());
- port::Tracing::ScopedActivity region(port::Tracing::EventCategory::kCompute,
- id);
- }
+ // When ThreadScape profiling is off (which is the default), constructing the
+ // following code is simple enough that its overhead is negligible.
+ tracing::ScopedRegion region(tracing::EventCategory::kCompute,
+ op_kernel->name());
+
op_kernel->Compute(context);
}