Skip to content

Commit 1e4b0c8

Browse files
Revert "Upgrade bazel version 5.3.0 and fix some typo in tf version (#755)"
This reverts commit 2c1e7fa.
1 parent b4c7ea1 commit 1e4b0c8

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

.bazelversion

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5.3.0
1+
5.1.0

configure.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,10 @@ fi
9494
TF_CFLAGS=( $(python -c 'import tensorflow as tf; print(" ".join(tf.sysconfig.get_compile_flags()))') )
9595
TF_LFLAGS="$(python -c 'import tensorflow as tf; print(" ".join(tf.sysconfig.get_link_flags()))')"
9696

97+
write_to_bazelrc "build:cuda --define=using_cuda=true --define=using_cuda_nvcc=true"
98+
if [[ "$PIP_MANYLINUX2010" == "0" ]]; then
99+
write_to_bazelrc "build:cuda --crosstool_top=@local_config_cuda//crosstool:toolchain"
100+
fi
97101

98102
write_to_bazelrc "build --experimental_repo_remote_exec"
99103
write_to_bazelrc "build --spawn_strategy=standalone"
@@ -138,12 +142,8 @@ fi
138142

139143
# TODO(yifeif): do not hardcode path
140144
if [[ "$TF_NEED_CUDA" == "1" ]]; then
141-
write_to_bazelrc "build:cuda --define=using_cuda=true --define=using_cuda_nvcc=true"
142-
write_to_bazelrc "build:cuda --@local_config_cuda//:enable_cuda"
143-
write_to_bazelrc "build:cuda --crosstool_top=@local_config_cuda//crosstool:toolchain"
144-
145145
write_action_env_to_bazelrc "TF_CUDA_VERSION" ${TF_CUDA_VERSION}
146-
write_action_env_to_bazelrc "TF_CUDNN_VERSION" "8"
146+
write_action_env_to_bazelrc "TF_CUDNN_VERSION" "7"
147147
if is_windows; then
148148
write_action_env_to_bazelrc "CUDNN_INSTALL_PATH" "C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v${TF_CUDA_VERSION}"
149149
write_action_env_to_bazelrc "CUDA_TOOLKIT_PATH" "C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v${TF_CUDA_VERSION}"

docs/install.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ TensorFlow Quantum is supported on Python 3.7, 3.8, and 3.9 and depends directly
1717
### Requirements
1818

1919
* pip 19.0 or later (requires `manylinux2010` support)
20-
* [TensorFlow == 2.11.0](https://www.tensorflow.org/install/pip)
20+
* [TensorFlow == 2.7.0](https://www.tensorflow.org/install/pip)
2121

2222
See the [TensorFlow install guide](https://www.tensorflow.org/install/pip) to
2323
set up your Python development environment and an (optional) virtual environment.
@@ -27,7 +27,7 @@ Upgrade `pip` and install TensorFlow
2727
<!-- common_typos_disable -->
2828
<pre class="devsite-click-to-copy">
2929
<code class="devsite-terminal">pip3 install --upgrade pip</code>
30-
<code class="devsite-terminal">pip3 install tensorflow==2.11.0</code>
30+
<code class="devsite-terminal">pip3 install tensorflow==2.7.0</code>
3131
</pre>
3232
<!-- common_typos_enable -->
3333

@@ -84,21 +84,21 @@ As noted in the TensorFlow
8484
guide, the <a href="https://bazel.build/" class="external">Bazel</a>
8585
build system will be required.
8686

87-
Our latest source builds use TensorFlow 2.11.0. To ensure compatibility we use `bazel` version 5.3.0. To remove any existing version of Bazel:
87+
Our latest source builds use TensorFlow 2.11.0. To ensure compatibility we use `bazel` version 5.1.0. To remove any existing version of Bazel:
8888

8989
<!-- common_typos_disable -->
9090
<pre class="devsite-click-to-copy">
9191
<code class="devsite-terminal">sudo apt-get remove bazel</code>
9292
</pre>
9393
<!-- common_typos_enable -->
9494

95-
Download and install `bazel` version 5.3.0:
95+
Download and install `bazel` version 5.1.0:
9696

9797
<!-- common_typos_disable -->
9898
<pre class="devsite-click-to-copy">
99-
<code class="devsite-terminal">wget https://github.com/bazelbuild/bazel/releases/download/5.3.0/bazel_5.3.0-linux-x86_64.deb
99+
<code class="devsite-terminal">wget https://github.com/bazelbuild/bazel/releases/download/5.1.0/bazel_5.1.0-linux-x86_64.deb
100100
</code>
101-
<code class="devsite-terminal">sudo dpkg -i bazel_5.3.0-linux-x86_64.deb</code>
101+
<code class="devsite-terminal">sudo dpkg -i bazel_5.1.0-linux-x86_64.deb</code>
102102
</pre>
103103
<!-- common_typos_enable -->
104104

0 commit comments

Comments
 (0)