diff options
-rw-r--r-- | tensorflow/contrib/tfprof/python/tools/tfprof/BUILD | 4 | ||||
-rw-r--r-- | tensorflow/contrib/tfprof/python/tools/tfprof/pprof_profiler.py | 2 | ||||
-rw-r--r-- | tensorflow/contrib/tfprof/python/tools/tfprof/pprof_profiler_test.py | 2 | ||||
-rw-r--r-- | tensorflow/workspace.bzl | 37 | ||||
-rw-r--r-- | third_party/pprof.BUILD | 2 |
5 files changed, 13 insertions, 34 deletions
diff --git a/tensorflow/contrib/tfprof/python/tools/tfprof/BUILD b/tensorflow/contrib/tfprof/python/tools/tfprof/BUILD index 0a920780c2..c96f6719e7 100644 --- a/tensorflow/contrib/tfprof/python/tools/tfprof/BUILD +++ b/tensorflow/contrib/tfprof/python/tools/tfprof/BUILD @@ -119,7 +119,7 @@ py_library( name = "pprof_profiler", srcs = ["pprof_profiler.py"], srcs_version = "PY2AND3", - deps = ["@pprof_profile_proto//:pprof_proto_py"], + deps = ["@com_google_pprof//:pprof_proto_py"], ) py_test( @@ -134,7 +134,7 @@ py_test( "//tensorflow/python:client_testlib", "//tensorflow/python:framework_test_lib", "//tensorflow/python:platform_test", - "@pprof_profile_proto//:pprof_proto_py", + "@com_google_pprof//:pprof_proto_py", ], ) diff --git a/tensorflow/contrib/tfprof/python/tools/tfprof/pprof_profiler.py b/tensorflow/contrib/tfprof/python/tools/tfprof/pprof_profiler.py index c3fea915a3..c57e45748d 100644 --- a/tensorflow/contrib/tfprof/python/tools/tfprof/pprof_profiler.py +++ b/tensorflow/contrib/tfprof/python/tools/tfprof/pprof_profiler.py @@ -47,7 +47,7 @@ import string import sys import time -from pprof import profile_pb2 +from proto import profile_pb2 if sys.version_info < (3,): diff --git a/tensorflow/contrib/tfprof/python/tools/tfprof/pprof_profiler_test.py b/tensorflow/contrib/tfprof/python/tools/tfprof/pprof_profiler_test.py index 13d3fb41ac..6487adf992 100644 --- a/tensorflow/contrib/tfprof/python/tools/tfprof/pprof_profiler_test.py +++ b/tensorflow/contrib/tfprof/python/tools/tfprof/pprof_profiler_test.py @@ -20,7 +20,7 @@ from __future__ import print_function import gzip -from pprof import profile_pb2 +from proto import profile_pb2 from tensorflow.contrib.tfprof.python.tools.tfprof import pprof_profiler from tensorflow.core.framework import step_stats_pb2 from tensorflow.core.protobuf import config_pb2 diff --git a/tensorflow/workspace.bzl b/tensorflow/workspace.bzl index 6a003c4e0e..0a495160ea 100644 --- a/tensorflow/workspace.bzl +++ b/tensorflow/workspace.bzl @@ -70,27 +70,6 @@ temp_workaround_http_archive = repository_rule( }, ) -def _http_files_with_build_impl(repo_ctx): - repo_ctx.template("BUILD", repo_ctx.attr.build_file, { - "%prefix%": ".." if _repos_are_siblings() else "external", - "%ws%": repo_ctx.attr.repository - }, False) - for output, urls in repo_ctx.attr.file_urls.items(): - repo_ctx.download(urls, output, - repo_ctx.attr.sha256, executable=False) - -# Downloads a set of files and adds a BUILD file. -http_files_with_build = repository_rule( - implementation = _http_files_with_build_impl, - attrs = { - "build_file": attr.label(), - "repository": attr.string(), - # Map from output file to URLs to download that file from. - "file_urls": attr.string_list_dict(default = {}), - "sha256": attr.string(default = ""), - }, -) - # Executes specified command with arguments and calls 'fail' if it exited with # non-zero code @@ -638,15 +617,15 @@ def tf_workspace(path_prefix="", tf_repo_name=""): repository = tf_repo_name, ) - http_files_with_build( - name = "pprof_profile_proto", - file_urls = { - "pprof/profile.proto": - ["https://raw.githubusercontent.com/google/pprof/master/proto/profile.proto"], - "pprof/LICENSE": - ["https://raw.githubusercontent.com/google/pprof/master/LICENSE"]}, + native.new_http_archive( + name = "com_google_pprof", + urls = [ + "http://bazel-mirror.storage.googleapis.com/github.com/google/pprof/archive/c0fb62ec88c411cc91194465e54db2632845b650.tar.gz", + "https://github.com/google/pprof/archive/c0fb62ec88c411cc91194465e54db2632845b650.tar.gz", + ], + sha256 = "e0928ca4aa10ea1e0551e2d7ce4d1d7ea2d84b2abbdef082b0da84268791d0c4", + strip_prefix = "pprof-c0fb62ec88c411cc91194465e54db2632845b650", build_file = str(Label("//third_party:pprof.BUILD")), - repository = tf_repo_name, ) ############################################################################## diff --git a/third_party/pprof.BUILD b/third_party/pprof.BUILD index 6f27bfc819..edd5209594 100644 --- a/third_party/pprof.BUILD +++ b/third_party/pprof.BUILD @@ -10,7 +10,7 @@ exports_files(["pprof/LICENSE"]) py_proto_library( name = "pprof_proto_py", - srcs = ["pprof/profile.proto"], + srcs = ["proto/profile.proto"], default_runtime = "@protobuf//:protobuf_python", protoc = "@protobuf//:protoc", srcs_version = "PY2AND3", |