Skip to content

Commit 2c1e7fa

Browse files
authored
Upgrade bazel version 5.3.0 and fix some typo in tf version (#755)
1 parent b0dd745 commit 2c1e7fa

File tree

4 files changed

+16
-16
lines changed

4 files changed

+16
-16
lines changed

.bazelversion

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5.1.0
1+
5.3.0

configure.sh

+7-7
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ done
6464
while [[ "$TF_CUDA_VERSION" == "" ]]; do
6565
read -p "Are you building against TensorFlow 2.1(including RCs) or newer?[Y/n] " INPUT
6666
case $INPUT in
67-
[Yy]* ) echo "Build against TensorFlow 2.1 or newer."; TF_CUDA_VERSION=10.1;;
67+
[Yy]* ) echo "Build against TensorFlow 2.1 or newer."; TF_CUDA_VERSION=11;;
6868
[Nn]* ) echo "Build against TensorFlow <2.1."; TF_CUDA_VERSION=10.0;;
69-
"" ) echo "Build against TensorFlow 2.1 or newer."; TF_CUDA_VERSION=10.1;;
69+
"" ) echo "Build against TensorFlow 2.1 or newer."; TF_CUDA_VERSION=11;;
7070
* ) echo "Invalid selection: " $INPUT;;
7171
esac
7272
done
@@ -94,10 +94,6 @@ 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
10197

10298
write_to_bazelrc "build --experimental_repo_remote_exec"
10399
write_to_bazelrc "build --spawn_strategy=standalone"
@@ -142,8 +138,12 @@ fi
142138

143139
# TODO(yifeif): do not hardcode path
144140
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" "7"
146+
write_action_env_to_bazelrc "TF_CUDNN_VERSION" "8"
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

+6-6
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.7.0](https://www.tensorflow.org/install/pip)
20+
* [TensorFlow == 2.11.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.7.0</code>
30+
<code class="devsite-terminal">pip3 install tensorflow==2.11.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.1.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.3.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.1.0:
95+
Download and install `bazel` version 5.3.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.1.0/bazel_5.1.0-linux-x86_64.deb
99+
<code class="devsite-terminal">wget https://github.com/bazelbuild/bazel/releases/download/5.3.0/bazel_5.3.0-linux-x86_64.deb
100100
</code>
101-
<code class="devsite-terminal">sudo dpkg -i bazel_5.1.0-linux-x86_64.deb</code>
101+
<code class="devsite-terminal">sudo dpkg -i bazel_5.3.0-linux-x86_64.deb</code>
102102
</pre>
103103
<!-- common_typos_enable -->
104104

scripts/ci_install.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
# ==============================================================================
16-
wget https://github.com/bazelbuild/bazel/releases/download/5.1.0/bazel_5.1.0-linux-x86_64.deb
17-
sudo dpkg -i bazel_5.1.0-linux-x86_64.deb
16+
wget https://github.com/bazelbuild/bazel/releases/download/5.3.0/bazel_5.3.0-linux-x86_64.deb
17+
sudo dpkg -i bazel_5.3.0-linux-x86_64.deb
1818
pip install --upgrade pip setuptools wheel
1919
pip install -r requirements.txt

0 commit comments

Comments
 (0)