Skip to content

Commit a0116e7

Browse files
authored
Merge branch 'master' into mhucka-fix-circuit-parser-warnings
2 parents 0b216e4 + 9101a91 commit a0116e7

24 files changed

+6550
-6277
lines changed

WORKSPACE

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ EIGEN_COMMIT = "aa6964bf3a34fd607837dd8123bc42465185c4f8"
1212

1313
http_archive(
1414
name = "eigen",
15+
sha256 = "35ba771e30c735a4215ed784d7e032086cf89fe6622dce4d793c45dd74373362",
1516
build_file_content = """
1617
cc_library(
1718
name = "eigen3",
@@ -41,7 +42,7 @@ http_archive(
4142
patches = [
4243
"//third_party/tf:tf.patch",
4344
],
44-
# sha256 = "e52cda3bae45f0ae0fccd4055e9fa29892b414f70e2df94df9a3a10319c75fff",
45+
sha256 = "f771db8d96ca13c72f73c85c9cfb6f5358e2de3dd62a97a9ae4b672fe4c6d094",
4546
strip_prefix = "tensorflow-2.15.0",
4647
urls = [
4748
"https://github.com/tensorflow/tensorflow/archive/refs/tags/v2.15.0.zip",

configure.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,28 @@ write_to_bazelrc "build -c opt"
102102
write_to_bazelrc "build --cxxopt=\"-D_GLIBCXX_USE_CXX11_ABI=1\""
103103
write_to_bazelrc "build --cxxopt=\"-std=c++17\""
104104

105+
# The transitive inclusion of build rules from TensorFlow ends up including
106+
# and building two copies of zlib (one from bazel_rules, one from the TF code
107+
# baase itself). The version of zlib you get (at least in TF 2.15.0) ends up
108+
# producing many compiler warnings that "a function declaration without a
109+
# prototype is deprecated". It's difficult to patch the particular build rules
110+
# involved, so the approach taken here is to silence those warnings for stuff
111+
# in external/. TODO: figure out how to patch the BUILD files and put it there.
112+
write_to_bazelrc "build --per_file_copt=external/.*@-Wno-deprecated-non-prototype"
113+
write_to_bazelrc "build --host_per_file_copt=external/.*@-Wno-deprecated-non-prototype"
114+
115+
# Similarly, these are other harmless warnings about unused functions coming
116+
# from things pulled in by the TF bazel config rules.
117+
write_to_bazelrc "build --per_file_copt=external/com_google_protobuf/.*@-Wno-unused-function"
118+
write_to_bazelrc "build --host_per_file_copt=external/com_google_protobuf/.*@-Wno-unused-function"
119+
120+
# The following supress warnings coming from qsim.
121+
# TODO: fix the code in qsim & update TFQ to use the updated version.
122+
write_to_bazelrc "build --per_file_copt=tensorflow_quantum/core/ops/noise/tfq_.*@-Wno-unused-but-set-variable"
123+
write_to_bazelrc "build --host_per_file_copt=tensorflow_quantum/core/ops/noise/tfq_.*@-Wno-unused-but-set-variable"
124+
write_to_bazelrc "build --per_file_copt=tensorflow_quantum/core/ops/math_ops/tfq_.*@-Wno-deprecated-declarations"
125+
write_to_bazelrc "build --host_per_file_copt=tensorflow_quantum/core/ops/math_ops/tfq_.*@-Wno-deprecated-declarations"
126+
105127

106128
if is_windows; then
107129
# Use pywrap_tensorflow instead of tensorflow_framework on Windows

0 commit comments

Comments
 (0)