Skip to content

Commit 12efe48

Browse files
caisqtensorflower-gardener
authored andcommitted
Automated rollback of change 127562075
Change: 127709092
1 parent 249d4e9 commit 12efe48

19 files changed

Lines changed: 255 additions & 1560 deletions

tensorflow/core/BUILD

Lines changed: 35 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -560,8 +560,6 @@ filegroup(
560560
"client/**/*.cc",
561561
"common_runtime/**/*.h",
562562
"common_runtime/**/*.cc",
563-
"debug/**/*.h",
564-
"debug/**/*.cc",
565563
"framework/**/*.h",
566564
"framework/**/*.cc",
567565
"graph/**/*.h",
@@ -1087,7 +1085,6 @@ tf_cuda_library(
10871085
linkstatic = 1,
10881086
deps = [
10891087
":core_cpu_internal",
1090-
":debug_graph_utils",
10911088
":framework",
10921089
":gpu_tracer",
10931090
":lib",
@@ -1117,23 +1114,6 @@ tf_cuda_library(
11171114
alwayslink = 1,
11181115
)
11191116

1120-
tf_cuda_library(
1121-
name = "debug_graph_utils",
1122-
srcs = ["debug/debug_graph_utils.cc"],
1123-
hdrs = ["debug/debug_graph_utils.h"],
1124-
copts = tf_copts(),
1125-
linkstatic = 1,
1126-
deps = [
1127-
":core_cpu_internal",
1128-
":framework",
1129-
":lib",
1130-
":lib_internal",
1131-
":proto_text",
1132-
":protos_all_cc",
1133-
],
1134-
alwayslink = 1,
1135-
)
1136-
11371117
cc_library(
11381118
name = "example_parser_configuration",
11391119
srcs = ["example/example_parser_configuration.cc"],
@@ -1603,9 +1583,43 @@ tf_cc_test(
16031583
],
16041584
)
16051585

1606-
tf_cc_test_gpu(
1586+
tf_cc_test(
16071587
name = "debug/debug_gateway_test",
16081588
size = "small",
1589+
linkstatic = tf_kernel_tests_linkstatic(),
1590+
deps = [
1591+
":core",
1592+
":core_cpu",
1593+
":core_cpu_internal",
1594+
":debug_gateway_internal",
1595+
":direct_session_internal",
1596+
":framework",
1597+
":framework_internal",
1598+
":lib",
1599+
":lib_internal",
1600+
":ops",
1601+
":protos_all_cc",
1602+
":test",
1603+
":test_main",
1604+
":testlib",
1605+
"//tensorflow/cc:cc_ops",
1606+
"//tensorflow/core/kernels:control_flow_ops",
1607+
"//tensorflow/core/kernels:cwise_op",
1608+
"//tensorflow/core/kernels:dense_update_ops",
1609+
"//tensorflow/core/kernels:fifo_queue_op",
1610+
"//tensorflow/core/kernels:identity_op",
1611+
"//tensorflow/core/kernels:matmul_op",
1612+
"//tensorflow/core/kernels:ops_util",
1613+
"//tensorflow/core/kernels:queue_ops",
1614+
"//tensorflow/core/kernels:session_ops",
1615+
"//tensorflow/core/kernels:variable_ops",
1616+
"//third_party/eigen3",
1617+
],
1618+
)
1619+
1620+
tf_cc_test_gpu(
1621+
name = "debug/debug_gateway_gpu_test",
1622+
size = "small",
16091623
args = ["--heap_check=local"],
16101624
linkstatic = tf_kernel_tests_linkstatic(),
16111625
tags = tf_cuda_tests_tags() + ["nomac"],
@@ -1614,7 +1628,6 @@ tf_cc_test_gpu(
16141628
":core_cpu",
16151629
":core_cpu_internal",
16161630
":debug_gateway_internal",
1617-
":debug_graph_utils",
16181631
":direct_session",
16191632
":direct_session_internal",
16201633
":framework",
@@ -1627,7 +1640,6 @@ tf_cc_test_gpu(
16271640
":test_main",
16281641
":testlib",
16291642
"//tensorflow/cc:cc_ops",
1630-
"//tensorflow/core/kernels:debug_ops",
16311643
"//tensorflow/core/kernels:ops_util",
16321644
],
16331645
)

tensorflow/core/common_runtime/direct_session.cc

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -284,15 +284,6 @@ Status DirectSession::Run(const RunOptions& run_options,
284284
}
285285
thread::ThreadPool* pool = thread_pools_[run_options.inter_op_thread_pool()];
286286

287-
// EXPERIMENTAL: Options that allow the client to insert nodes into partition
288-
// graphs for debugging.
289-
if (!run_options.debug_tensor_watch_opts().empty()) {
290-
debug_node_inserter_.reset(
291-
new DebugNodeInserter(run_options.debug_tensor_watch_opts()));
292-
} else {
293-
debug_node_inserter_.reset(nullptr);
294-
}
295-
296287
// Check if we already have an executor for these arguments.
297288
ExecutorsAndKeys* executors_and_keys;
298289
RunStateArgs run_state_args;
@@ -803,12 +794,6 @@ Status DirectSession::GetOrCreateExecutors(
803794

804795
partition_graph = iter->second.release();
805796
optimizer.Optimize(lib, device, &partition_graph);
806-
807-
// EXPERIMENTAL: tfdb inserts debug nodes (i.e., probes) to the graph
808-
if (debug_node_inserter_) {
809-
TF_RETURN_IF_ERROR(
810-
debug_node_inserter_->InsertNodes(partition_graph, params.device));
811-
}
812797
iter->second.reset(partition_graph);
813798

814799
TF_RETURN_IF_ERROR(EnsureMemoryTypes(DeviceType(device->device_type()),

tensorflow/core/common_runtime/direct_session.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ limitations under the License.
2929
#include "tensorflow/core/common_runtime/executor.h"
3030
#include "tensorflow/core/common_runtime/rendezvous_mgr.h"
3131
#include "tensorflow/core/common_runtime/simple_graph_execution_state.h"
32-
#include "tensorflow/core/debug/debug_graph_utils.h"
3332
#include "tensorflow/core/framework/cancellation.h"
3433
#include "tensorflow/core/framework/graph.pb.h"
3534
#include "tensorflow/core/framework/session_state.h"
@@ -254,9 +253,7 @@ class DirectSession : public Session {
254253

255254
TF_DISALLOW_COPY_AND_ASSIGN(DirectSession);
256255

257-
// EXPERIMENTAL: debugger (tfdb) related
258256
friend class DebugGateway;
259-
std::unique_ptr<DebugNodeInserter> debug_node_inserter_;
260257
};
261258

262259
} // end namespace tensorflow

tensorflow/core/common_runtime/gpu/gpu_util.cc

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -426,32 +426,4 @@ uint64 GPUUtil::Checksum(const Tensor& tensor) {
426426
tensor.TotalBytes(), 0);
427427
}
428428

429-
// static
430-
void GPUUtil::CopyGPUTensorToSameGPU(Device* gpu_device,
431-
const DeviceContext* device_context,
432-
const Tensor* src_gpu_tensor,
433-
Tensor* dst_gpu_tensor,
434-
StatusCallback done) {
435-
VLOG(1) << "CopyGPUTensorToSameGPU";
436-
const DeviceBase::GpuDeviceInfo* dev_info = nullptr;
437-
gpu::Stream* send_stream = nullptr;
438-
Status s = PrepareCopy(gpu_device, device_context, *src_gpu_tensor,
439-
dst_gpu_tensor, &dev_info, &send_stream);
440-
if (!s.ok()) {
441-
done(s);
442-
return;
443-
}
444-
445-
const int64 total_bytes = src_gpu_tensor->TotalBytes();
446-
if (total_bytes > 0) {
447-
void* src_ptr = GetBase(src_gpu_tensor);
448-
DeviceMemoryBase gpu_src_ptr(src_ptr, total_bytes);
449-
void* dst_ptr = GetBase(dst_gpu_tensor);
450-
DeviceMemoryBase gpu_dst_ptr(dst_ptr, total_bytes);
451-
send_stream->ThenMemcpy(&gpu_dst_ptr, gpu_src_ptr, total_bytes);
452-
}
453-
454-
done(Status::OK());
455-
}
456-
457429
} // namespace tensorflow

tensorflow/core/common_runtime/gpu/gpu_util.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -100,16 +100,6 @@ class GPUUtil {
100100
AllocatorAttributes dst_alloc_attr,
101101
const Tensor* input, Tensor* output,
102102
StatusCallback done);
103-
104-
// Deep-copying of GPU tensor on the same device.
105-
// 'src_gpu_tensor''s and 'dst_gpu_tensor''s backing memory must be on
106-
// 'gpu_device' and 'dst_cpu_tensor' must be allocated to be of the same
107-
// size as 'src_gpu_tensor'.
108-
static void CopyGPUTensorToSameGPU(Device* gpu_device,
109-
const DeviceContext* device_context,
110-
const Tensor* src_gpu_tensor,
111-
Tensor* dst_gpu_tensor,
112-
StatusCallback done);
113103
};
114104

115105
} // namespace tensorflow

0 commit comments

Comments
 (0)