-
Notifications
You must be signed in to change notification settings - Fork 17
/
tf_base.patch
507 lines (483 loc) · 21.5 KB
/
tf_base.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
diff --git a/tensorflow/contrib/cmake/CMakeLists.txt b/tensorflow/contrib/cmake/CMakeLists.txt
index 44431d5010..cb8a7fd8c8 100644
--- a/tensorflow/contrib/cmake/CMakeLists.txt
+++ b/tensorflow/contrib/cmake/CMakeLists.txt
@@ -1,6 +1,9 @@
# Minimum CMake required
cmake_minimum_required(VERSION 3.5)
+SET_PROPERTY(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
+SET_PROPERTY(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
+
if(WIN32)
if(${CMAKE_VERSION} VERSION_LESS "3.8")
message(WARNING "Your current cmake version is ${CMAKE_VERSION} which does not support setting the toolset architecture to x64. This may cause \"compiler out of heap space\" errors when building. Consider upgrading your cmake to > 3.8 and using the flag -Thost=x64 when running cmake. Ignore this if you are on CMake GUI.")
diff --git a/tensorflow/c/eager/c_api.cc b/tensorflow/c/eager/c_api.cc
index dfb1c9a376..248ed67450 100644
--- a/tensorflow/c/eager/c_api.cc
+++ b/tensorflow/c/eager/c_api.cc
@@ -36,9 +36,9 @@ limitations under the License.
#include "tensorflow/core/common_runtime/eager/execute.h"
#include "tensorflow/core/common_runtime/function.h"
#include "tensorflow/core/common_runtime/rendezvous_mgr.h"
-#include "tensorflow/core/distributed_runtime/rpc/eager/grpc_eager_client.h"
-#include "tensorflow/core/distributed_runtime/rpc/grpc_channel.h"
-#include "tensorflow/core/distributed_runtime/rpc/grpc_server_lib.h"
+//#include "tensorflow/core/distributed_runtime/rpc/eager/grpc_eager_client.h"
+//#include "tensorflow/core/distributed_runtime/rpc/grpc_channel.h"
+//#include "tensorflow/core/distributed_runtime/rpc/grpc_server_lib.h"
#include "tensorflow/core/distributed_runtime/server_lib.h"
#include "tensorflow/core/distributed_runtime/worker_env.h"
#include "tensorflow/core/framework/node_def_util.h"
@@ -167,6 +167,7 @@ tensorflow::Status UpdateTFE_ContextWithServerDef(
} \
} while (0);
+#if 0
string worker_name =
tensorflow::strings::StrCat("/job:", server_def.job_name(),
"/replica:0/task:", server_def.task_index());
@@ -229,6 +230,7 @@ tensorflow::Status UpdateTFE_ContextWithServerDef(
std::move(remote_device_mgr), remote_contexts,
r, device_mgr, keep_alive_secs);
+#endif
return tensorflow::Status::OK();
#undef LOG_AND_RETURN_IF_ERROR
}
diff --git a/tensorflow/c/eager/c_api_internal.h b/tensorflow/c/eager/c_api_internal.h
index a5c0681e2e..40e26885ba 100644
--- a/tensorflow/c/eager/c_api_internal.h
+++ b/tensorflow/c/eager/c_api_internal.h
@@ -39,10 +39,10 @@ limitations under the License.
#include "tensorflow/core/common_runtime/rendezvous_mgr.h"
#include "tensorflow/core/distributed_runtime/eager/eager_client.h"
#include "tensorflow/core/distributed_runtime/remote_device.h"
-#include "tensorflow/core/distributed_runtime/rpc/grpc_server_lib.h"
-#include "tensorflow/core/distributed_runtime/rpc/grpc_worker_cache.h"
-#include "tensorflow/core/distributed_runtime/rpc/grpc_worker_service.h"
-#include "tensorflow/core/distributed_runtime/rpc/rpc_rendezvous_mgr.h"
+//#include "tensorflow/core/distributed_runtime/rpc/grpc_server_lib.h"
+//#include "tensorflow/core/distributed_runtime/rpc/grpc_worker_cache.h"
+//#include "tensorflow/core/distributed_runtime/rpc/grpc_worker_service.h"
+//#include "tensorflow/core/distributed_runtime/rpc/rpc_rendezvous_mgr.h"
#include "tensorflow/core/distributed_runtime/server_lib.h"
#include "tensorflow/core/distributed_runtime/worker_env.h"
#include "tensorflow/core/framework/rendezvous.h"
diff --git a/tensorflow/contrib/cmake/tf_core_framework.cmake b/tensorflow/contrib/cmake/tf_core_framework.cmake
index 067c299a71..51338eb082 100644
--- a/tensorflow/contrib/cmake/tf_core_framework.cmake
+++ b/tensorflow/contrib/cmake/tf_core_framework.cmake
@@ -49,7 +49,7 @@ function(RELATIVE_PROTOBUF_GENERATE_CPP SRCS HDRS ROOT_DIR)
set(${HDRS} ${${HDRS}} PARENT_SCOPE)
endfunction()
-if(NOT WIN32)
+if(NOT WIN32 AND tensorflow_ENABLE_GRPC_SUPPORT)
function(RELATIVE_PROTOBUF_GENERATE_GRPC_CPP SRCS HDRS ROOT_DIR)
if(NOT ARGN)
message(SEND_ERROR "Error: RELATIVE_PROTOBUF_GENERATE_GRPC_CPP() called without any proto files")
@@ -178,12 +178,12 @@ RELATIVE_PROTOBUF_TEXT_GENERATE_CPP(PROTO_TEXT_SRCS PROTO_TEXT_HDRS
if(WIN32)
add_library(tf_protos_cc ${PROTO_SRCS} ${PROTO_HDRS})
else()
- file(GLOB_RECURSE tf_protos_grpc_cc_srcs RELATIVE ${tensorflow_source_dir}
- "${tensorflow_source_dir}/tensorflow/core/debug/*.proto"
- )
- RELATIVE_PROTOBUF_GENERATE_GRPC_CPP(PROTO_GRPC_SRCS PROTO_GRPC_HDRS
- ${tensorflow_source_dir} ${tf_protos_grpc_cc_srcs}
- )
+# file(GLOB_RECURSE tf_protos_grpc_cc_srcs RELATIVE ${tensorflow_source_dir}
+# "${tensorflow_source_dir}/tensorflow/core/debug/*.proto"
+# )
+# RELATIVE_PROTOBUF_GENERATE_GRPC_CPP(PROTO_GRPC_SRCS PROTO_GRPC_HDRS
+# ${tensorflow_source_dir} ${tf_protos_grpc_cc_srcs}
+# )
add_library(tf_protos_cc ${PROTO_GRPC_SRCS} ${PROTO_GRPC_HDRS} ${PROTO_SRCS} ${PROTO_HDRS})
endif()
@@ -272,7 +272,7 @@ if (NOT WIN32)
add_custom_command(OUTPUT __force_rebuild COMMAND ${CMAKE_COMMAND} -E echo)
add_custom_command(OUTPUT
${VERSION_INFO_CC}
- COMMAND ${PYTHON_EXECUTABLE} ${tensorflow_source_dir}/tensorflow/tools/git/gen_git_source.py
+ COMMAND python2 ${tensorflow_source_dir}/tensorflow/tools/git/gen_git_source.py
ARGS --raw_generate ${VERSION_INFO_CC} --source_dir ${tensorflow_source_dir} --git_tag_override=${GIT_TAG_OVERRIDE}
DEPENDS __force_rebuild)
endif()
diff --git a/tensorflow/contrib/cmake/tf_shared_lib.cmake b/tensorflow/contrib/cmake/tf_shared_lib.cmake
index fdf522f1fd..1352033c2e 100644
--- a/tensorflow/contrib/cmake/tf_shared_lib.cmake
+++ b/tensorflow/contrib/cmake/tf_shared_lib.cmake
@@ -64,7 +64,7 @@ endif(WIN32)
# tensorflow is a shared library containing all of the
# TensorFlow runtime and the standard ops and kernels.
-add_library(tensorflow SHARED
+add_library(tensorflow STATIC
$<TARGET_OBJECTS:tf_c_eager>
$<TARGET_OBJECTS:tf_core_eager_runtime>
$<TARGET_OBJECTS:tf_c>
@@ -90,7 +90,7 @@ add_library(tensorflow SHARED
target_link_libraries(tensorflow PRIVATE
${tf_core_gpu_kernels_lib}
${tensorflow_EXTERNAL_LIBRARIES}
- tf_protos_cc
+ $<TARGET_FILE:tf_protos_cc>
)
# There is a bug in GCC 5 resulting in undefined reference to a __cpu_model function when
diff --git a/tensorflow/core/debug/debug_io_utils.cc b/tensorflow/core/debug/debug_io_utils.cc
index 9e8002d490..01f45821dd 100644
--- a/tensorflow/core/debug/debug_io_utils.cc
+++ b/tensorflow/core/debug/debug_io_utils.cc
@@ -23,10 +23,10 @@ limitations under the License.
#include <vector>
#ifndef PLATFORM_WINDOWS
-#include "grpcpp/create_channel.h"
+//#include "grpcpp/create_channel.h"
#else
// winsock2.h is used in grpc, so Ws2_32.lib is needed
-#pragma comment(lib, "Ws2_32.lib")
+//#pragma comment(lib, "Ws2_32.lib")
#endif // #ifndef PLATFORM_WINDOWS
#include "tensorflow/core/debug/debug_callback_registry.h"
@@ -238,7 +238,7 @@ string AppendTimestampToFilePath(const string& in, const uint64 timestamp) {
return out;
}
-#ifndef PLATFORM_WINDOWS
+#if 0
// Publishes encoded GraphDef through a gRPC debugger stream, in chunks,
// conforming to the gRPC message size limit.
Status PublishEncodedGraphDefInChunks(const string& encoded_graph_def,
@@ -369,7 +369,7 @@ Status DebugIO::PublishDebugMetadata(
Status status;
for (const string& url : debug_urls) {
if (str_util::Lowercase(url).find(kGrpcURLScheme) == 0) {
-#ifndef PLATFORM_WINDOWS
+#if 0
Event grpc_event;
// Determine the path (if any) in the grpc:// URL, and add it as a field
@@ -387,7 +387,7 @@ Status DebugIO::PublishDebugMetadata(
status.Update(
DebugGrpcIO::SendEventProtoThroughGrpcStream(grpc_event, url, true));
#else
- GRPC_OSS_WINDOWS_UNIMPLEMENTED_ERROR;
+// GRPC_OSS_WINDOWS_UNIMPLEMENTED_ERROR;
#endif
} else if (str_util::Lowercase(url).find(kFileURLScheme) == 0) {
const string dump_root_dir = url.substr(strlen(kFileURLScheme));
@@ -425,7 +425,7 @@ Status DebugIO::PublishDebugTensor(const DebugNodeKey& debug_node_key,
fail_statuses.push_back(s);
}
} else if (str_util::Lowercase(url).find(kGrpcURLScheme) == 0) {
-#ifndef PLATFORM_WINDOWS
+#if 0
Status s = DebugGrpcIO::SendTensorThroughGrpcStream(
debug_node_key, tensor, wall_time_us, url, gated_grpc);
@@ -434,7 +434,7 @@ Status DebugIO::PublishDebugTensor(const DebugNodeKey& debug_node_key,
fail_statuses.push_back(s);
}
#else
- GRPC_OSS_WINDOWS_UNIMPLEMENTED_ERROR;
+// GRPC_OSS_WINDOWS_UNIMPLEMENTED_ERROR;
#endif
} else if (str_util::Lowercase(url).find(kMemoryURLScheme) == 0) {
const string dump_root_dir = url.substr(strlen(kMemoryURLScheme));
@@ -498,11 +498,11 @@ Status DebugIO::PublishGraph(const Graph& graph, const string& device_name,
status.Update(
DebugFileIO::DumpEventProtoToFile(event, dump_root_dir, file_name));
} else if (debug_url.find(kGrpcURLScheme) == 0) {
-#ifndef PLATFORM_WINDOWS
+#if 0
status.Update(PublishEncodedGraphDefInChunks(buf, device_name, now_micros,
debug_url));
#else
- GRPC_OSS_WINDOWS_UNIMPLEMENTED_ERROR;
+// GRPC_OSS_WINDOWS_UNIMPLEMENTED_ERROR;
#endif
}
}
@@ -512,7 +512,7 @@ Status DebugIO::PublishGraph(const Graph& graph, const string& device_name,
bool DebugIO::IsCopyNodeGateOpen(
const std::vector<DebugWatchAndURLSpec>& specs) {
-#ifndef PLATFORM_WINDOWS
+#if 0
for (const DebugWatchAndURLSpec& spec : specs) {
if (!spec.gated_grpc || spec.url.compare(0, strlen(DebugIO::kGrpcURLScheme),
DebugIO::kGrpcURLScheme)) {
@@ -531,7 +531,7 @@ bool DebugIO::IsCopyNodeGateOpen(
bool DebugIO::IsDebugNodeGateOpen(const string& watch_key,
const std::vector<string>& debug_urls) {
-#ifndef PLATFORM_WINDOWS
+#if 0
for (const string& debug_url : debug_urls) {
if (debug_url.compare(0, strlen(DebugIO::kGrpcURLScheme),
DebugIO::kGrpcURLScheme)) {
@@ -550,7 +550,7 @@ bool DebugIO::IsDebugNodeGateOpen(const string& watch_key,
bool DebugIO::IsDebugURLGateOpen(const string& watch_key,
const string& debug_url) {
-#ifndef PLATFORM_WINDOWS
+#if 0
if (debug_url.find(kGrpcURLScheme) != 0) {
return true;
} else {
@@ -563,10 +563,10 @@ bool DebugIO::IsDebugURLGateOpen(const string& watch_key,
Status DebugIO::CloseDebugURL(const string& debug_url) {
if (debug_url.find(DebugIO::kGrpcURLScheme) == 0) {
-#ifndef PLATFORM_WINDOWS
+#if 0
return DebugGrpcIO::CloseGrpcStream(debug_url);
#else
- GRPC_OSS_WINDOWS_UNIMPLEMENTED_ERROR;
+// GRPC_OSS_WINDOWS_UNIMPLEMENTED_ERROR;
#endif
} else {
// No-op for non-gRPC URLs.
@@ -670,7 +670,7 @@ Status DebugFileIO::RecursiveCreateDir(Env* env, const string& dir) {
}
}
-#ifndef PLATFORM_WINDOWS
+#if 0
DebugGrpcChannel::DebugGrpcChannel(const string& server_stream_addr)
: server_stream_addr_(server_stream_addr),
url_(strings::StrCat(DebugIO::kGrpcURLScheme, server_stream_addr)) {}
diff --git a/tensorflow/core/debug/debug_io_utils.h b/tensorflow/core/debug/debug_io_utils.h
index c974a47051..a1132f6df3 100644
--- a/tensorflow/core/debug/debug_io_utils.h
+++ b/tensorflow/core/debug/debug_io_utils.h
@@ -223,7 +223,7 @@ struct hash<::tensorflow::DebugNodeKey> {
// TODO(cais): Support grpc:// debug URLs in open source once Python grpc
// genrule becomes available. See b/23796275.
-#ifndef PLATFORM_WINDOWS
+#if 0
#include "tensorflow/core/debug/debug_service.grpc.pb.h"
namespace tensorflow {
diff --git a/tensorflow/contrib/cmake/external/abseil_cpp.cmake b/tensorflow/contrib/cmake/external/abseil_cpp.cmake
index 46a193971c..9afab30de0 100644
--- a/tensorflow/contrib/cmake/external/abseil_cpp.cmake
+++ b/tensorflow/contrib/cmake/external/abseil_cpp.cmake
@@ -39,8 +39,8 @@ else (systemlib_ABSEIL_CPP)
include (ExternalProject)
set(abseil_cpp_INCLUDE_DIR ${CMAKE_BINARY_DIR}/abseil_cpp/src/abseil_cpp)
- set(abseil_cpp_URL https://github.com/abseil/abseil-cpp/archive/e01d95528ea2137a4a27a88d1f57c6cb260aafed.tar.gz)
- set(abseil_cpp_HASH SHA256=84043ed402d2a2a6ba4cdddb7e85118b1158fd81fe4ac3a14adc343d054c1e2e)
+ set(abseil_cpp_URL https://github.com/abseil/abseil-cpp/archive/cd86d0d20ab167c33b23d3875db68d1d4bad3a3b.tar.gz)
+ #set(abseil_cpp_HASH SHA256=84043ed402d2a2a6ba4cdddb7e85118b1158fd81fe4ac3a14adc343d054c1e2e)
set(abseil_cpp_BUILD ${CMAKE_BINARY_DIR}/abseil_cpp/src/abseil_cpp-build)
if(WIN32)
@@ -73,14 +73,23 @@ else (systemlib_ABSEIL_CPP)
${abseil_cpp_BUILD}/absl/base/libabsl_throw_delegate.a
${abseil_cpp_BUILD}/absl/numeric/libabsl_int128.a
${abseil_cpp_BUILD}/absl/strings/libabsl_strings.a
- ${abseil_cpp_BUILD}/absl/strings/libstr_format_internal.a
+ ${abseil_cpp_BUILD}/absl/strings/libabsl_str_format_internal.a
+ ${abseil_cpp_BUILD}/absl/hash/libabsl_hash.a
+ ${abseil_cpp_BUILD}/absl/container/libabsl_hashtablez_sampler.a
+ ${abseil_cpp_BUILD}/absl/synchronization/libabsl_synchronization.a
+ ${abseil_cpp_BUILD}/absl/debugging/libabsl_stacktrace.a
+ ${abseil_cpp_BUILD}/absl/debugging/libabsl_symbolize.a
+ ${abseil_cpp_BUILD}/absl/debugging/libabsl_debugging_internal.a
+ ${abseil_cpp_BUILD}/absl/debugging/libabsl_demangle_internal.a
+ ${abseil_cpp_BUILD}/absl/time/libabsl_time.a
+ ${abseil_cpp_BUILD}/absl/time/libabsl_time_zone.a
+ ${abseil_cpp_BUILD}/absl/hash/libabsl_city.a
${abseil_cpp_BUILD}/absl/types/libabsl_bad_optional_access.a)
endif()
ExternalProject_Add(abseil_cpp
PREFIX abseil_cpp
URL ${abseil_cpp_URL}
- URL_HASH ${abseil_cpp_HASH}
DOWNLOAD_DIR "${DOWNLOAD_LOCATION}"
BUILD_BYPRODUCTS ${abseil_cpp_STATIC_LIBRARIES}
INSTALL_COMMAND ""
diff --git a/tensorflow/contrib/cmake/tf_tools.cmake b/tensorflow/contrib/cmake/tf_tools.cmake
index 58c7df95c8..28443c9bf6 100644
--- a/tensorflow/contrib/cmake/tf_tools.cmake
+++ b/tensorflow/contrib/cmake/tf_tools.cmake
@@ -32,7 +32,7 @@ target_link_libraries(${proto_text} PUBLIC
tf_protos_cc
)
-add_dependencies(${proto_text} tf_core_lib)
+add_dependencies(${proto_text} tf_core_lib abseil_cpp)
if(tensorflow_ENABLE_GRPC_SUPPORT)
add_dependencies(${proto_text} grpc)
endif(tensorflow_ENABLE_GRPC_SUPPORT)
@@ -58,94 +58,94 @@ add_dependencies(tf_tools_transform_graph_lib tf_core_kernels)
add_dependencies(tf_tools_transform_graph_lib tf_core_lib)
add_dependencies(tf_tools_transform_graph_lib tf_core_ops)
-set(transform_graph "transform_graph")
-
-add_executable(${transform_graph}
- "${tensorflow_source_dir}/tensorflow/tools/graph_transforms/transform_graph_main.cc"
- $<TARGET_OBJECTS:tf_tools_transform_graph_lib>
- $<TARGET_OBJECTS:tf_core_lib>
- $<TARGET_OBJECTS:tf_core_cpu>
- $<TARGET_OBJECTS:tf_core_framework>
- $<TARGET_OBJECTS:tf_core_ops>
- $<TARGET_OBJECTS:tf_core_direct_session>
- $<TARGET_OBJECTS:tf_tools_transform_graph_lib>
- $<TARGET_OBJECTS:tf_core_kernels>
- $<$<BOOL:${tensorflow_ENABLE_GPU}>:$<$<BOOL:${BOOL_WIN32}>:$<TARGET_OBJECTS:tf_core_kernels_cpu_only>>>
- $<$<BOOL:${tensorflow_ENABLE_GPU}>:$<TARGET_OBJECTS:tf_stream_executor>>
-)
-
-target_link_libraries(${transform_graph} PUBLIC
- tf_protos_cc
- ${tf_core_gpu_kernels_lib}
- ${tensorflow_EXTERNAL_LIBRARIES}
-)
-
-set(summarize_graph "summarize_graph")
-
-add_executable(${summarize_graph}
- "${tensorflow_source_dir}/tensorflow/tools/graph_transforms/summarize_graph_main.cc"
- $<TARGET_OBJECTS:tf_tools_transform_graph_lib>
- $<TARGET_OBJECTS:tf_core_lib>
- $<TARGET_OBJECTS:tf_core_cpu>
- $<TARGET_OBJECTS:tf_core_framework>
- $<TARGET_OBJECTS:tf_core_ops>
- $<TARGET_OBJECTS:tf_core_direct_session>
- $<TARGET_OBJECTS:tf_tools_transform_graph_lib>
- $<TARGET_OBJECTS:tf_core_kernels>
- $<$<BOOL:${tensorflow_ENABLE_GPU}>:$<$<BOOL:${BOOL_WIN32}>:$<TARGET_OBJECTS:tf_core_kernels_cpu_only>>>
- $<$<BOOL:${tensorflow_ENABLE_GPU}>:$<TARGET_OBJECTS:tf_stream_executor>>
-)
-
-target_link_libraries(${summarize_graph} PUBLIC
- tf_protos_cc
- ${tf_core_gpu_kernels_lib}
- ${tensorflow_EXTERNAL_LIBRARIES}
-)
-
-set(compare_graphs "compare_graphs")
-
-add_executable(${compare_graphs}
- "${tensorflow_source_dir}/tensorflow/tools/graph_transforms/compare_graphs.cc"
- $<TARGET_OBJECTS:tf_tools_transform_graph_lib>
- $<TARGET_OBJECTS:tf_core_lib>
- $<TARGET_OBJECTS:tf_core_cpu>
- $<TARGET_OBJECTS:tf_core_framework>
- $<TARGET_OBJECTS:tf_core_ops>
- $<TARGET_OBJECTS:tf_core_direct_session>
- $<TARGET_OBJECTS:tf_tools_transform_graph_lib>
- $<TARGET_OBJECTS:tf_core_kernels>
- $<$<BOOL:${tensorflow_ENABLE_GPU}>:$<$<BOOL:${BOOL_WIN32}>:$<TARGET_OBJECTS:tf_core_kernels_cpu_only>>>
- $<$<BOOL:${tensorflow_ENABLE_GPU}>:$<TARGET_OBJECTS:tf_stream_executor>>
-)
-
-target_link_libraries(${compare_graphs} PUBLIC
- tf_protos_cc
- ${tf_core_gpu_kernels_lib}
- ${tensorflow_EXTERNAL_LIBRARIES}
-)
-
-set(benchmark_model "benchmark_model")
-
-add_executable(${benchmark_model}
- "${tensorflow_source_dir}/tensorflow/tools/benchmark/benchmark_model.cc"
- "${tensorflow_source_dir}/tensorflow/tools/benchmark/benchmark_model_main.cc"
- $<TARGET_OBJECTS:tf_core_lib>
- $<TARGET_OBJECTS:tf_core_cpu>
- $<TARGET_OBJECTS:tf_core_framework>
- $<TARGET_OBJECTS:tf_core_ops>
- $<TARGET_OBJECTS:tf_core_direct_session>
- $<TARGET_OBJECTS:tf_core_kernels>
- $<$<BOOL:${tensorflow_ENABLE_GPU}>:$<$<BOOL:${BOOL_WIN32}>:$<TARGET_OBJECTS:tf_core_kernels_cpu_only>>>
- $<$<BOOL:${tensorflow_ENABLE_GPU}>:$<TARGET_OBJECTS:tf_stream_executor>>
-)
-
-target_link_libraries(${benchmark_model} PUBLIC
- tf_protos_cc
- ${tf_core_gpu_kernels_lib}
- ${tensorflow_EXTERNAL_LIBRARIES}
-)
-
-install(TARGETS ${transform_graph} ${summarize_graph} ${compare_graphs} ${benchmark_model}
- RUNTIME DESTINATION bin
- LIBRARY DESTINATION lib
- ARCHIVE DESTINATION lib)
+#set(transform_graph "transform_graph")
+
+#add_executable(${transform_graph}
+# "${tensorflow_source_dir}/tensorflow/tools/graph_transforms/transform_graph_main.cc"
+# $<TARGET_OBJECTS:tf_tools_transform_graph_lib>
+# $<TARGET_OBJECTS:tf_core_lib>
+# $<TARGET_OBJECTS:tf_core_cpu>
+# $<TARGET_OBJECTS:tf_core_framework>
+# $<TARGET_OBJECTS:tf_core_ops>
+# $<TARGET_OBJECTS:tf_core_direct_session>
+# $<TARGET_OBJECTS:tf_tools_transform_graph_lib>
+# $<TARGET_OBJECTS:tf_core_kernels>
+# $<$<BOOL:${tensorflow_ENABLE_GPU}>:$<$<BOOL:${BOOL_WIN32}>:$<TARGET_OBJECTS:tf_core_kernels_cpu_only>>>
+# $<$<BOOL:${tensorflow_ENABLE_GPU}>:$<TARGET_OBJECTS:tf_stream_executor>>
+#)
+
+#target_link_libraries(${transform_graph} PUBLIC
+# tf_protos_cc
+# ${tf_core_gpu_kernels_lib}
+# ${tensorflow_EXTERNAL_LIBRARIES}
+#)
+
+#set(summarize_graph "summarize_graph")
+
+#add_executable(${summarize_graph}
+# "${tensorflow_source_dir}/tensorflow/tools/graph_transforms/summarize_graph_main.cc"
+# $<TARGET_OBJECTS:tf_tools_transform_graph_lib>
+# $<TARGET_OBJECTS:tf_core_lib>
+# $<TARGET_OBJECTS:tf_core_cpu>
+# $<TARGET_OBJECTS:tf_core_framework>
+# $<TARGET_OBJECTS:tf_core_ops>
+# $<TARGET_OBJECTS:tf_core_direct_session>
+# $<TARGET_OBJECTS:tf_tools_transform_graph_lib>
+# $<TARGET_OBJECTS:tf_core_kernels>
+# $<$<BOOL:${tensorflow_ENABLE_GPU}>:$<$<BOOL:${BOOL_WIN32}>:$<TARGET_OBJECTS:tf_core_kernels_cpu_only>>>
+# $<$<BOOL:${tensorflow_ENABLE_GPU}>:$<TARGET_OBJECTS:tf_stream_executor>>
+#)
+
+#target_link_libraries(${summarize_graph} PUBLIC
+# tf_protos_cc
+# ${tf_core_gpu_kernels_lib}
+# ${tensorflow_EXTERNAL_LIBRARIES}
+#)
+
+#set(compare_graphs "compare_graphs")
+
+#add_executable(${compare_graphs}
+# "${tensorflow_source_dir}/tensorflow/tools/graph_transforms/compare_graphs.cc"
+# $<TARGET_OBJECTS:tf_tools_transform_graph_lib>
+# $<TARGET_OBJECTS:tf_core_lib>
+# $<TARGET_OBJECTS:tf_core_cpu>
+# $<TARGET_OBJECTS:tf_core_framework>
+# $<TARGET_OBJECTS:tf_core_ops>
+# $<TARGET_OBJECTS:tf_core_direct_session>
+# $<TARGET_OBJECTS:tf_tools_transform_graph_lib>
+# $<TARGET_OBJECTS:tf_core_kernels>
+# $<$<BOOL:${tensorflow_ENABLE_GPU}>:$<$<BOOL:${BOOL_WIN32}>:$<TARGET_OBJECTS:tf_core_kernels_cpu_only>>>
+# $<$<BOOL:${tensorflow_ENABLE_GPU}>:$<TARGET_OBJECTS:tf_stream_executor>>
+#)
+
+#target_link_libraries(${compare_graphs} PUBLIC
+# tf_protos_cc
+# ${tf_core_gpu_kernels_lib}
+# ${tensorflow_EXTERNAL_LIBRARIES}
+#)
+
+#set(benchmark_model "benchmark_model")
+
+#add_executable(${benchmark_model}
+# "${tensorflow_source_dir}/tensorflow/tools/benchmark/benchmark_model.cc"
+# "${tensorflow_source_dir}/tensorflow/tools/benchmark/benchmark_model_main.cc"
+# $<TARGET_OBJECTS:tf_core_lib>
+# $<TARGET_OBJECTS:tf_core_cpu>
+# $<TARGET_OBJECTS:tf_core_framework>
+# $<TARGET_OBJECTS:tf_core_ops>
+# $<TARGET_OBJECTS:tf_core_direct_session>
+# $<TARGET_OBJECTS:tf_core_kernels>
+# $<$<BOOL:${tensorflow_ENABLE_GPU}>:$<$<BOOL:${BOOL_WIN32}>:$<TARGET_OBJECTS:tf_core_kernels_cpu_only>>>
+# $<$<BOOL:${tensorflow_ENABLE_GPU}>:$<TARGET_OBJECTS:tf_stream_executor>>
+#)
+
+#target_link_libraries(${benchmark_model} PUBLIC
+# tf_protos_cc
+# ${tf_core_gpu_kernels_lib}
+# ${tensorflow_EXTERNAL_LIBRARIES}
+#)
+
+#install(TARGETS ${transform_graph} ${summarize_graph} ${compare_graphs} ${benchmark_model}
+# RUNTIME DESTINATION bin
+# LIBRARY DESTINATION lib
+# ARCHIVE DESTINATION lib)