aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib/tfprof
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2017-07-10 22:11:52 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-07-10 22:16:36 -0700
commit8281e234c1dd741f30f657b66d129089e81f63e8 (patch)
tree08def7533b3d056d81bbc8ebfd0e68a01ba9db2f /tensorflow/contrib/tfprof
parentea3d9ab10f6391ce131f0fd39a214c66fdf06ae6 (diff)
tfprof further clean ups
PiperOrigin-RevId: 161486865
Diffstat (limited to 'tensorflow/contrib/tfprof')
-rw-r--r--tensorflow/contrib/tfprof/BUILD1
-rw-r--r--tensorflow/contrib/tfprof/model_analyzer.py7
-rw-r--r--tensorflow/contrib/tfprof/tfprof_logger.py9
3 files changed, 15 insertions, 2 deletions
diff --git a/tensorflow/contrib/tfprof/BUILD b/tensorflow/contrib/tfprof/BUILD
index 9b9215234e..4ff97e5d76 100644
--- a/tensorflow/contrib/tfprof/BUILD
+++ b/tensorflow/contrib/tfprof/BUILD
@@ -14,6 +14,7 @@ py_library(
srcs_version = "PY2AND3",
visibility = ["//tensorflow:__subpackages__"],
deps = [
+ "//tensorflow/python:util",
"//tensorflow/python/profiler:model_analyzer",
"//tensorflow/python/profiler:tfprof_logger",
],
diff --git a/tensorflow/contrib/tfprof/model_analyzer.py b/tensorflow/contrib/tfprof/model_analyzer.py
index a7b609a031..d45c8f54c4 100644
--- a/tensorflow/contrib/tfprof/model_analyzer.py
+++ b/tensorflow/contrib/tfprof/model_analyzer.py
@@ -28,6 +28,7 @@ from tensorflow.python.profiler.model_analyzer import advise as _advise
from tensorflow.python.profiler.model_analyzer import ALL_ADVICE
from tensorflow.python.profiler.model_analyzer import profile as _profile
from tensorflow.python.profiler.model_analyzer import Profiler
+from tensorflow.python.util.deprecation import deprecated
_DEFAULT_PROFILE_OPTIONS = 0
_DEFAULT_ADVISE_OPTIONS = 0
@@ -98,10 +99,16 @@ PRINT_ALL_TIMING_MEMORY = {
# pylint: enable=bad-continuation
+@deprecated('2018-01-01',
+ 'Use `tf.profiler.advise(graph, run_meta, options)`. See README.md')
def advise(graph, run_meta=None, tfprof_options=_DEFAULT_ADVISE_OPTIONS):
return _advise(graph, run_meta, tfprof_options)
+@deprecated('2018-01-01',
+ 'Use `tf.profiler.profile(graph, run_meta, op_log, cmd, options)`. '
+ 'Build `options` with `tf.profiler.ProfileOptionBuilder`. '
+ 'See README.md for details')
def print_model_analysis(graph,
run_meta=None,
op_log=None,
diff --git a/tensorflow/contrib/tfprof/tfprof_logger.py b/tensorflow/contrib/tfprof/tfprof_logger.py
index 321ac5ad9f..78eaca37a1 100644
--- a/tensorflow/contrib/tfprof/tfprof_logger.py
+++ b/tensorflow/contrib/tfprof/tfprof_logger.py
@@ -20,5 +20,10 @@ from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
-# pylint: disable=unused-import
-from tensorflow.python.profiler.tfprof_logger import write_op_log
+from tensorflow.python.profiler.tfprof_logger import write_op_log as _write_op_log
+from tensorflow.python.util.deprecation import deprecated
+
+
+@deprecated("2018-01-01", "Use `tf.profiler.write_op_log. go/tfprof`")
+def write_op_log(graph, log_dir, op_log=None, run_meta=None, add_trace=True):
+ _write_op_log(graph, log_dir, op_log, run_meta, add_trace)