Lines 1-14
Link Here
|
1 |
--- tensorflow/tensorflow.bzl.orig 2019-06-18 23:48:23.000000000 +0100 |
1 |
--- tensorflow/tensorflow.bzl.orig 2021-01-04 20:18:42 UTC |
2 |
+++ tensorflow/tensorflow.bzl 2019-07-13 13:57:17.579194000 +0100 |
2 |
+++ tensorflow/tensorflow.bzl |
3 |
@@ -287,6 +287,7 @@ |
3 |
@@ -289,6 +289,7 @@ def tf_copts( |
|
|
4 |
"-Iexternal/gemmlowp", |
4 |
"-Wno-sign-compare", |
5 |
"-Wno-sign-compare", |
5 |
"-fno-exceptions", |
|
|
6 |
"-ftemplate-depth=900", |
6 |
"-ftemplate-depth=900", |
7 |
+ "-I%%LOCALBASE%%/include", |
7 |
+ "-I/usr/local/include", |
8 |
]) + |
8 |
]) + |
|
|
9 |
(if_not_windows(["-fno-exceptions"]) if not allow_exceptions else []) + |
9 |
if_cuda(["-DGOOGLE_CUDA=1"]) + |
10 |
if_cuda(["-DGOOGLE_CUDA=1"]) + |
10 |
if_tensorrt(["-DGOOGLE_TENSORRT=1"]) + |
11 |
@@ -628,7 +629,7 @@ def tf_cc_binary( |
11 |
@@ -603,7 +604,7 @@ |
|
|
12 |
], |
12 |
], |
13 |
), |
13 |
), |
14 |
data = depset(data + added_data_deps), |
14 |
data = depset(data + added_data_deps), |
Lines 17-23
Link Here
|
17 |
visibility = visibility, |
17 |
visibility = visibility, |
18 |
**kwargs |
18 |
**kwargs |
19 |
) |
19 |
) |
20 |
@@ -657,7 +658,7 @@ |
20 |
@@ -693,7 +694,7 @@ def tf_gen_op_wrapper_cc( |
21 |
tf_cc_binary( |
21 |
tf_cc_binary( |
22 |
name = tool, |
22 |
name = tool, |
23 |
copts = tf_copts(), |
23 |
copts = tf_copts(), |
Lines 26-41
Link Here
|
26 |
linkstatic = 1, # Faster to link this one-time-use binary dynamically |
26 |
linkstatic = 1, # Faster to link this one-time-use binary dynamically |
27 |
deps = [op_gen] + deps, |
27 |
deps = [op_gen] + deps, |
28 |
) |
28 |
) |
29 |
@@ -839,7 +840,7 @@ |
29 |
@@ -878,7 +879,7 @@ def tf_gen_op_wrapper_py( |
30 |
tf_cc_binary( |
30 |
tf_cc_binary( |
31 |
name = tool_name, |
31 |
name = tool_name, |
32 |
copts = tf_copts(), |
32 |
copts = tf_copts(), |
33 |
- linkopts = if_not_windows(["-lm", "-Wl,-ldl"]) + cc_linkopts, |
33 |
- linkopts = if_not_windows(["-lm", "-Wl,-ldl"]) + cc_linkopts, |
34 |
+ linkopts = if_not_windows(["-L%%LOCALBASE%%/lib", "-lm", "-Wl, -lexecinfo"]) + cc_linkopts, |
34 |
+ linkopts = if_not_windows(["-L/usr/local/lib", "-lm", "-Wl, -lexecinfo"]) + cc_linkopts, |
35 |
linkstatic = 1, # Faster to link this one-time-use binary dynamically |
35 |
linkstatic = 1, # Faster to link this one-time-use binary dynamically |
36 |
visibility = [clean_dep("//tensorflow:internal")], |
36 |
visibility = [clean_dep("//tensorflow:internal")], |
37 |
deps = ([ |
37 |
deps = ([ |
38 |
@@ -954,8 +955,9 @@ |
38 |
@@ -992,8 +993,9 @@ def tf_cc_test( |
39 |
"//conditions:default": [ |
39 |
"//conditions:default": [ |
40 |
"-lpthread", |
40 |
"-lpthread", |
41 |
"-lm", |
41 |
"-lm", |
Lines 46-52
Link Here
|
46 |
deps = deps + tf_binary_dynamic_kernel_deps(kernels) + if_mkl_ml( |
46 |
deps = deps + tf_binary_dynamic_kernel_deps(kernels) + if_mkl_ml( |
47 |
[ |
47 |
[ |
48 |
clean_dep("//third_party/mkl:intel_binary_blob"), |
48 |
clean_dep("//third_party/mkl:intel_binary_blob"), |
49 |
@@ -1103,7 +1105,7 @@ |
49 |
@@ -1140,7 +1142,7 @@ def tf_gpu_only_cc_test( |
50 |
]) + if_rocm_is_configured([ |
50 |
]) + if_rocm_is_configured([ |
51 |
clean_dep("//tensorflow/core:gpu_lib"), |
51 |
clean_dep("//tensorflow/core:gpu_lib"), |
52 |
]), |
52 |
]), |
Lines 55-61
Link Here
|
55 |
linkstatic = linkstatic or select({ |
55 |
linkstatic = linkstatic or select({ |
56 |
# cc_tests with ".so"s in srcs incorrectly link on Darwin |
56 |
# cc_tests with ".so"s in srcs incorrectly link on Darwin |
57 |
# unless linkstatic=1. |
57 |
# unless linkstatic=1. |
58 |
@@ -1784,6 +1786,7 @@ |
58 |
@@ -1820,6 +1822,7 @@ def tf_custom_op_library(name, srcs = [], gpu_srcs = [ |
59 |
linkopts = linkopts + select({ |
59 |
linkopts = linkopts + select({ |
60 |
"//conditions:default": [ |
60 |
"//conditions:default": [ |
61 |
"-lm", |
61 |
"-lm", |