Commit 5393c8f0 authored by Derek Murray's avatar Derek Murray Committed by TensorFlower Gardener
Browse files

Add `TraceCollector::IsEnabled(bool)` method in order to test when tracing is enabled.

Some builds install a `TraceCollector` at process startup, but it is mostly not enabled. This inhibits the recent optimization to avoid accessing `OpKernel::name()` and `OpKernel::type_string()` every time a kernel is launched. By caching the `TraceCollector` in the `TracingDevice` and adding a method to enquire about its state, we increase the applicability of the optimization.

PiperOrigin-RevId: 211752728
parent f4ae1362
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment