From f36a1a090e469c632448722186a26a416fda4596 Mon Sep 17 00:00:00 2001 From: Jose Baiocchi Date: Fri, 29 May 2020 10:11:51 -0700 Subject: [PATCH] Lower level of python TraceMe to 1 PiperOrigin-RevId: 313802412 Change-Id: Ia7d3e0866f13676b6562f3290ca8385a1a37c312 --- .../python/profiler/internal/traceme_wrapper.h | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/tensorflow/python/profiler/internal/traceme_wrapper.h b/tensorflow/python/profiler/internal/traceme_wrapper.h index c074e909640..6e61d9cdd8f 100644 --- a/tensorflow/python/profiler/internal/traceme_wrapper.h +++ b/tensorflow/python/profiler/internal/traceme_wrapper.h @@ -34,13 +34,15 @@ class TraceMeWrapper { // pybind11::str and pybind11::kwargs are taken by const reference to avoid // python reference-counting overhead. TraceMeWrapper(const pybind11::str& name, const pybind11::kwargs& kwargs) - : traceme_([&]() { - std::string name_and_metadata(name); - if (!kwargs.empty()) { - AppendMetadata(&name_and_metadata, kwargs); - } - return name_and_metadata; - }) {} + : traceme_( + [&]() { + std::string name_and_metadata(name); + if (!kwargs.empty()) { + AppendMetadata(&name_and_metadata, kwargs); + } + return name_and_metadata; + }, + /*level=*/1) {} // pybind11::kwargs is taken by const reference to avoid python // reference-counting overhead.