diff --git a/.bazelversion b/.bazelversion index 831446cbd..03f488b07 100644 --- a/.bazelversion +++ b/.bazelversion @@ -1 +1 @@ -5.1.0 +5.3.0 diff --git a/configure.sh b/configure.sh index 5efd4212a..ff42047fe 100755 --- a/configure.sh +++ b/configure.sh @@ -64,9 +64,9 @@ done while [[ "$TF_CUDA_VERSION" == "" ]]; do read -p "Are you building against TensorFlow 2.1(including RCs) or newer?[Y/n] " INPUT case $INPUT in - [Yy]* ) echo "Build against TensorFlow 2.1 or newer."; TF_CUDA_VERSION=10.1;; + [Yy]* ) echo "Build against TensorFlow 2.1 or newer."; TF_CUDA_VERSION=11;; [Nn]* ) echo "Build against TensorFlow <2.1."; TF_CUDA_VERSION=10.0;; - "" ) echo "Build against TensorFlow 2.1 or newer."; TF_CUDA_VERSION=10.1;; + "" ) echo "Build against TensorFlow 2.1 or newer."; TF_CUDA_VERSION=11;; * ) echo "Invalid selection: " $INPUT;; esac done @@ -94,10 +94,6 @@ fi TF_CFLAGS=( $(python -c 'import tensorflow as tf; print(" ".join(tf.sysconfig.get_compile_flags()))') ) TF_LFLAGS="$(python -c 'import tensorflow as tf; print(" ".join(tf.sysconfig.get_link_flags()))')" -write_to_bazelrc "build:cuda --define=using_cuda=true --define=using_cuda_nvcc=true" -if [[ "$PIP_MANYLINUX2010" == "0" ]]; then - write_to_bazelrc "build:cuda --crosstool_top=@local_config_cuda//crosstool:toolchain" -fi write_to_bazelrc "build --experimental_repo_remote_exec" write_to_bazelrc "build --spawn_strategy=standalone" @@ -142,8 +138,12 @@ fi # TODO(yifeif): do not hardcode path if [[ "$TF_NEED_CUDA" == "1" ]]; then + write_to_bazelrc "build:cuda --define=using_cuda=true --define=using_cuda_nvcc=true" + write_to_bazelrc "build:cuda --@local_config_cuda//:enable_cuda" + write_to_bazelrc "build:cuda --crosstool_top=@local_config_cuda//crosstool:toolchain" + write_action_env_to_bazelrc "TF_CUDA_VERSION" ${TF_CUDA_VERSION} - write_action_env_to_bazelrc "TF_CUDNN_VERSION" "7" + write_action_env_to_bazelrc "TF_CUDNN_VERSION" "8" if is_windows; then write_action_env_to_bazelrc "CUDNN_INSTALL_PATH" "C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v${TF_CUDA_VERSION}" write_action_env_to_bazelrc "CUDA_TOOLKIT_PATH" "C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v${TF_CUDA_VERSION}" diff --git a/docs/install.md b/docs/install.md index 5e64d0616..3de77ecf9 100644 --- a/docs/install.md +++ b/docs/install.md @@ -17,7 +17,7 @@ TensorFlow Quantum is supported on Python 3.7, 3.8, and 3.9 and depends directly ### Requirements * pip 19.0 or later (requires `manylinux2010` support) -* [TensorFlow == 2.7.0](https://www.tensorflow.org/install/pip) +* [TensorFlow == 2.11.0](https://www.tensorflow.org/install/pip) See the [TensorFlow install guide](https://www.tensorflow.org/install/pip) to set up your Python development environment and an (optional) virtual environment. @@ -27,7 +27,7 @@ Upgrade `pip` and install TensorFlow
@@ -84,7 +84,7 @@ As noted in the TensorFlow guide, the Bazel build system will be required. -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: +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:pip3 install --upgrade pip
-pip3 install tensorflow==2.7.0
+pip3 install tensorflow==2.11.0
@@ -92,13 +92,13 @@ Our latest source builds use TensorFlow 2.11.0. To ensure compatibility we use `-Download and install `bazel` version 5.1.0: +Download and install `bazel` version 5.3.0:
- wget https://github.com/bazelbuild/bazel/releases/download/5.1.0/bazel_5.1.0-linux-x86_64.deb
+ wget https://github.com/bazelbuild/bazel/releases/download/5.3.0/bazel_5.3.0-linux-x86_64.deb
- sudo dpkg -i bazel_5.1.0-linux-x86_64.deb
+ sudo dpkg -i bazel_5.3.0-linux-x86_64.deb
diff --git a/scripts/ci_install.sh b/scripts/ci_install.sh
index a0ed81c8c..04e6b3159 100755
--- a/scripts/ci_install.sh
+++ b/scripts/ci_install.sh
@@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
-wget https://github.com/bazelbuild/bazel/releases/download/5.1.0/bazel_5.1.0-linux-x86_64.deb
-sudo dpkg -i bazel_5.1.0-linux-x86_64.deb
+wget https://github.com/bazelbuild/bazel/releases/download/5.3.0/bazel_5.3.0-linux-x86_64.deb
+sudo dpkg -i bazel_5.3.0-linux-x86_64.deb
pip install --upgrade pip setuptools wheel
pip install -r requirements.txt
\ No newline at end of file