diff options
author | 2018-04-30 18:01:23 -0700 | |
---|---|---|
committer | 2018-04-30 18:03:56 -0700 | |
commit | 40721422bfc9cec546537799e16dd75f443d2db2 (patch) | |
tree | d0f19a645a057c57055fda86ed8b3fb0c1da3647 | |
parent | c8a0f6e92b3197c76c5aac1d2a7612e2f4b3fc56 (diff) |
Remove proto header import from core/framework/tracking_allocator.h
The goal is to make kernels mostly independent of proto headers, which will let us lock down our .so import.
PiperOrigin-RevId: 194876569
-rw-r--r-- | tensorflow/core/common_runtime/eager/kernel_and_device.cc | 1 | ||||
-rw-r--r-- | tensorflow/core/common_runtime/eager/kernel_and_device.h | 4 | ||||
-rw-r--r-- | tensorflow/core/framework/tracking_allocator.h | 1 |
3 files changed, 5 insertions, 1 deletions
diff --git a/tensorflow/core/common_runtime/eager/kernel_and_device.cc b/tensorflow/core/common_runtime/eager/kernel_and_device.cc index 0a4895a938..a63b2b9711 100644 --- a/tensorflow/core/common_runtime/eager/kernel_and_device.cc +++ b/tensorflow/core/common_runtime/eager/kernel_and_device.cc @@ -19,6 +19,7 @@ limitations under the License. #include "tensorflow/core/common_runtime/rendezvous_mgr.h" #include "tensorflow/core/framework/allocator.h" #include "tensorflow/core/framework/node_def.pb.h" +#include "tensorflow/core/framework/step_stats.pb.h" #include "tensorflow/core/lib/core/errors.h" #include "tensorflow/core/lib/gtl/map_util.h" #include "tensorflow/core/lib/gtl/stl_util.h" diff --git a/tensorflow/core/common_runtime/eager/kernel_and_device.h b/tensorflow/core/common_runtime/eager/kernel_and_device.h index 46ec550c78..f78d197fd5 100644 --- a/tensorflow/core/common_runtime/eager/kernel_and_device.h +++ b/tensorflow/core/common_runtime/eager/kernel_and_device.h @@ -32,6 +32,10 @@ limitations under the License. namespace tensorflow { +// Forward declaration for proto class NodeExecStats so we do not need to +// include the proto header +class NodeExecStats; + // KernelAndDevice encapsulates an instantiated kernel and the device it is on. // // Also see: diff --git a/tensorflow/core/framework/tracking_allocator.h b/tensorflow/core/framework/tracking_allocator.h index f6c3c0b71b..661c28969e 100644 --- a/tensorflow/core/framework/tracking_allocator.h +++ b/tensorflow/core/framework/tracking_allocator.h @@ -18,7 +18,6 @@ limitations under the License. #include <unordered_map> #include "tensorflow/core/framework/allocator.h" -#include "tensorflow/core/framework/step_stats.pb.h" #include "tensorflow/core/lib/core/refcount.h" #include "tensorflow/core/lib/gtl/inlined_vector.h" #include "tensorflow/core/platform/mutex.h" |