Skip to content

Commit 9558943

Browse files
committed
Updated TF Windows Doc
1 parent 1f8a2c7 commit 9558943

File tree

2 files changed

+52
-60
lines changed

2 files changed

+52
-60
lines changed

site/en/install/pip.md

Lines changed: 48 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,9 @@ step-by-step instructions.
2626
for more information about this collaboration.
2727

2828
```bash
29-
conda install -c conda-forge cudatoolkit=11.8.0
30-
python3 -m pip install nvidia-cudnn-cu11==8.6.0.163 tensorflow==2.12.*
31-
mkdir -p $CONDA_PREFIX/etc/conda/activate.d
32-
echo 'CUDNN_PATH=$(dirname $(python -c "import nvidia.cudnn;print(nvidia.cudnn.__file__)"))' >> $CONDA_PREFIX/etc/conda/activate.d/env_vars.sh
33-
echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CONDA_PREFIX/lib/:$CUDNN_PATH/lib' >> $CONDA_PREFIX/etc/conda/activate.d/env_vars.sh
34-
source $CONDA_PREFIX/etc/conda/activate.d/env_vars.sh
29+
conda install -c conda-forge cudatoolkit=11.2.2 cudnn=8.1.0
30+
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CONDA_PREFIX/lib/
31+
python3 -m pip install tensorflow
3532
# Verify install:
3633
python3 -c "import tensorflow as tf; print(tf.config.list_physical_devices('GPU'))"
3734
```
@@ -75,12 +72,9 @@ step-by-step instructions.
7572
for CUDA in WSL.
7673

7774
```bash
78-
conda install -c conda-forge cudatoolkit=11.8.0
79-
python3 -m pip install nvidia-cudnn-cu11==8.6.0.163 tensorflow==2.12.*
80-
mkdir -p $CONDA_PREFIX/etc/conda/activate.d
81-
echo 'CUDNN_PATH=$(dirname $(python -c "import nvidia.cudnn;print(nvidia.cudnn.__file__)"))' >> $CONDA_PREFIX/etc/conda/activate.d/env_vars.sh
82-
echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CONDA_PREFIX/lib/:$CUDNN_PATH/lib' >> $CONDA_PREFIX/etc/conda/activate.d/env_vars.sh
83-
source $CONDA_PREFIX/etc/conda/activate.d/env_vars.sh
75+
conda install -c conda-forge cudatoolkit=11.2 cudnn=8.1.0
76+
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CONDA_PREFIX/lib/
77+
python3 -m pip install tensorflow
8478
# Verify install:
8579
python3 -c "import tensorflow as tf; print(tf.config.list_physical_devices('GPU'))"
8680
```
@@ -151,7 +145,7 @@ Note: GPU support is available for Ubuntu and Windows with CUDA®-enabled cards.
151145
## Software requirements
152146
153147
* Python 3.8–3.11
154-
* pip version 19.0 or higher for Linux (requires `manylinux2014` support) and
148+
* pip version 19.0 or higher for Linux (requires `manylinux2010` support) and
155149
Windows. pip version 20.3 or higher for macOS.
156150
* Windows Native Requires
157151
[Microsoft Visual C++ Redistributable for Visual Studio 2015, 2017 and 2019](https://support.microsoft.com/help/2977003/the-latest-supported-visual-c-downloads){:.external}
@@ -161,8 +155,8 @@ The following NVIDIA® software are only required for GPU support.
161155
162156
* [NVIDIA® GPU drivers](https://www.nvidia.com/drivers){:.external}
163157
version 450.80.02 or higher.
164-
* [CUDA® Toolkit 11.8](https://developer.nvidia.com/cuda-toolkit-archive){:.external}.
165-
* [cuDNN SDK 8.6.0](https://developer.nvidia.com/cudnn){:.external}.
158+
* [CUDA® Toolkit 11.2](https://developer.nvidia.com/cuda-toolkit-archive){:.external}.
159+
* [cuDNN SDK 8.1.0](https://developer.nvidia.com/cudnn){:.external}.
166160
* *(Optional)*
167161
[TensorRT](https://docs.nvidia.com/deeplearning/tensorrt/archives/index.html#trt_7){:.external}
168162
to improve latency and throughput for inference.
@@ -239,19 +233,17 @@ The following NVIDIA® software are only required for GPU support.
239233
nvidia-smi
240234
```
241235

242-
Then install CUDA and cuDNN with conda and pip.
236+
Then install CUDA and cuDNN with conda.
243237

244238
```bash
245-
conda install -c conda-forge cudatoolkit=11.8.0
246-
pip install nvidia-cudnn-cu11==8.6.0.163
239+
conda install -c conda-forge cudatoolkit=11.2.2 cudnn=8.1.0
247240
```
248241

249242
Configure the system paths. You can do it with the following command every time
250243
you start a new terminal after activating your conda environment.
251244

252245
```bash
253-
CUDNN_PATH=$(dirname $(python -c "import nvidia.cudnn;print(nvidia.cudnn.__file__)"))
254-
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CONDA_PREFIX/lib/:$CUDNN_PATH/lib
246+
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CONDA_PREFIX/lib/
255247
```
256248

257249
For your convenience it is recommended that you automate it with the following
@@ -260,8 +252,7 @@ The following NVIDIA® software are only required for GPU support.
260252

261253
```bash
262254
mkdir -p $CONDA_PREFIX/etc/conda/activate.d
263-
echo 'CUDNN_PATH=$(dirname $(python -c "import nvidia.cudnn;print(nvidia.cudnn.__file__)"))' >> $CONDA_PREFIX/etc/conda/activate.d/env_vars.sh
264-
echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CONDA_PREFIX/lib/:$CUDNN_PATH/lib' >> $CONDA_PREFIX/etc/conda/activate.d/env_vars.sh
255+
echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CONDA_PREFIX/lib/' > $CONDA_PREFIX/etc/conda/activate.d/env_vars.sh
265256
```
266257

267258
### 5. Install TensorFlow
@@ -280,7 +271,7 @@ The following NVIDIA® software are only required for GPU support.
280271
PyPI.
281272
282273
```bash
283-
pip install tensorflow==2.12.*
274+
pip install tensorflow==2.11.*
284275
```
285276
286277
### 6. Verify install
@@ -321,7 +312,7 @@ The following NVIDIA® software are only required for GPU support.
321312
conda install -c nvidia cuda-nvcc=11.3.58
322313
# Configure the XLA cuda directory
323314
mkdir -p $CONDA_PREFIX/etc/conda/activate.d
324-
printf 'export XLA_FLAGS=--xla_gpu_cuda_data_dir=$CONDA_PREFIX/lib/\n' >> $CONDA_PREFIX/etc/conda/activate.d/env_vars.sh
315+
printf 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CONDA_PREFIX/lib/\nexport XLA_FLAGS=--xla_gpu_cuda_data_dir=$CONDA_PREFIX/lib/\n' > $CONDA_PREFIX/etc/conda/activate.d/env_vars.sh
325316
source $CONDA_PREFIX/etc/conda/activate.d/env_vars.sh
326317
# Copy libdevice file to the required path
327318
mkdir -p $CONDA_PREFIX/lib/nvvm/libdevice
@@ -607,19 +598,17 @@ The following NVIDIA® software are only required for GPU support.
607598
nvidia-smi
608599
```
609600
610-
Then install CUDA and cuDNN with conda and pip.
601+
Then install CUDA and cuDNN with conda.
611602
612603
```bash
613-
conda install -c conda-forge cudatoolkit=11.8.0
614-
pip install nvidia-cudnn-cu11==8.6.0.163
604+
conda install -c conda-forge cudatoolkit=11.2 cudnn=8.1.0
615605
```
616606
617607
Configure the system paths. You can do it with following command everytime
618608
your start a new terminal after activating your conda environment.
619609
620610
```bash
621-
CUDNN_PATH=$(dirname $(python -c "import nvidia.cudnn;print(nvidia.cudnn.__file__)"))
622-
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CONDA_PREFIX/lib/:$CUDNN_PATH/lib
611+
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CONDA_PREFIX/lib/
623612
```
624613
625614
For your convenience it is recommended that you automate it with the following
@@ -628,8 +617,7 @@ The following NVIDIA® software are only required for GPU support.
628617
629618
```bash
630619
mkdir -p $CONDA_PREFIX/etc/conda/activate.d
631-
echo 'CUDNN_PATH=$(dirname $(python -c "import nvidia.cudnn;print(nvidia.cudnn.__file__)"))' >> $CONDA_PREFIX/etc/conda/activate.d/env_vars.sh
632-
echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CONDA_PREFIX/lib/:$CUDNN_PATH/lib' >> $CONDA_PREFIX/etc/conda/activate.d/env_vars.sh
620+
echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CONDA_PREFIX/lib/' > $CONDA_PREFIX/etc/conda/activate.d/env_vars.sh
633621
```
634622
635623
### 5. Install TensorFlow
@@ -648,7 +636,7 @@ The following NVIDIA® software are only required for GPU support.
648636
PyPI.
649637

650638
```bash
651-
pip install tensorflow==2.12.*
639+
pip install tensorflow
652640
```
653641

654642
### 6. Verify install
@@ -679,57 +667,73 @@ The value you specify depends on your Python version.
679667
<table>
680668
<tr><th>Version</th><th>URL</th></tr>
681669
<tr class="alt"><td colspan="2">Linux</td></tr>
670+
<tr>
671+
<td>Python 3.7 GPU&nbsp;support</td>
672+
<td class="devsite-click-to-copy">https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-2.11.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl</td>
673+
</tr>
674+
<tr>
675+
<td>Python 3.7 CPU-only</td>
676+
<td class="devsite-click-to-copy">https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow_cpu-2.11.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl</td>
677+
</tr>
682678
<tr>
683679
<td>Python 3.8 GPU&nbsp;support</td>
684-
<td class="devsite-click-to-copy">https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-2.12.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl</td>
680+
<td class="devsite-click-to-copy">https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-2.11.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl</td>
685681
</tr>
686682
<tr>
687683
<td>Python 3.8 CPU-only</td>
688-
<td class="devsite-click-to-copy">https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow_cpu-2.12.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl</td>
684+
<td class="devsite-click-to-copy">https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow_cpu-2.11.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl</td>
689685
</tr>
690686
<tr>
691687
<td>Python 3.9 GPU&nbsp;support</td>
692-
<td class="devsite-click-to-copy">https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-2.12.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl</td>
688+
<td class="devsite-click-to-copy">https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-2.11.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl</td>
693689
</tr>
694690
<tr>
695691
<td>Python 3.9 CPU-only</td>
696-
<td class="devsite-click-to-copy">https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow_cpu-2.12.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl</td>
692+
<td class="devsite-click-to-copy">https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow_cpu-2.11.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl</td>
697693
</tr>
698694
<tr>
699695
<td>Python 3.10 GPU&nbsp;support</td>
700-
<td class="devsite-click-to-copy">https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-2.12.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl</td>
696+
<td class="devsite-click-to-copy">https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-2.11.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl</td>
701697
</tr>
702698
<tr>
703699
<td>Python 3.10 CPU-only</td>
704-
<td class="devsite-click-to-copy">https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow_cpu-2.12.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl</td>
700+
<td class="devsite-click-to-copy">https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow_cpu-2.11.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl</td>
705701
</tr>
706702

707703
<tr class="alt"><td colspan="2">macOS (CPU-only)</td></tr>
704+
<tr>
705+
<td>Python 3.7</td>
706+
<td class="devsite-click-to-copy">https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-2.11.0-cp37-cp37m-macosx_10_14_x86_64.whl</td>
707+
</tr>
708708
<tr>
709709
<td>Python 3.8</td>
710-
<td class="devsite-click-to-copy">https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-2.12.0-cp38-cp38-macosx_10_15_x86_64.whl</td>
710+
<td class="devsite-click-to-copy">https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-2.11.0-cp38-cp38-macosx_10_14_x86_64.whl</td>
711711
</tr>
712712
<tr>
713713
<td>Python 3.9</td>
714-
<td class="devsite-click-to-copy">https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-2.12.0-cp39-cp39-macosx_10_15_x86_64.whl</td>
714+
<td class="devsite-click-to-copy">https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-2.11.0-cp39-cp39-macosx_10_14_x86_64.whl</td>
715715
</tr>
716716
<tr>
717717
<td>Python 3.10</td>
718-
<td class="devsite-click-to-copy">https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-2.12.0-cp310-cp310-macosx_10_15_x86_64.whl</td>
718+
<td class="devsite-click-to-copy">https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-2.11.0-cp310-cp310-macosx_10_14_x86_64.whl</td>
719719
</tr>
720720

721721
<tr class="alt"><td colspan="2">Windows</td></tr>
722+
<tr>
723+
<td>Python 3.7 CPU-only</td>
724+
<td class="devsite-click-to-copy">https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow_cpu-2.11.0-cp37-cp37m-win_amd64.whl</td>
725+
</tr>
722726
<tr>
723727
<td>Python 3.8 CPU-only</td>
724-
<td class="devsite-click-to-copy">https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow_cpu-2.12.0-cp38-cp38-win_amd64.whl</td>
728+
<td class="devsite-click-to-copy">https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow_cpu-2.11.0-cp38-cp38-win_amd64.whl</td>
725729
</tr>
726730
<tr>
727731
<td>Python 3.9 CPU-only</td>
728-
<td class="devsite-click-to-copy">https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow_cpu-2.12.0-cp39-cp39-win_amd64.whl</td>
732+
<td class="devsite-click-to-copy">https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow_cpu-2.11.0-cp39-cp39-win_amd64.whl</td>
729733
</tr>
730734
<tr>
731735
<td>Python 3.10 CPU-only</td>
732-
<td class="devsite-click-to-copy">https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow_cpu-2.12.0-cp310-cp310-win_amd64.whl</td>
736+
<td class="devsite-click-to-copy">https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow_cpu-2.11.0-cp310-cp310-win_amd64.whl</td>
733737
</tr>
734738

735739
</table>

site/en/install/source_windows.md

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ environment.
1313
### Install Python and the TensorFlow package dependencies
1414

1515
Install a
16-
[Python 3.8+ 64-bit release for Windows](https://www.python.org/downloads/windows/){:.external}.
16+
[Python 3.9+ 64-bit release for Windows](https://www.python.org/downloads/windows/){:.external}.
1717
Select *pip* as an optional feature and add it to your `%PATH%` environmental
1818
variable.
1919

@@ -69,7 +69,7 @@ Note: TensorFlow is tested against the *Visual Studio 2019*.
6969
See the Windows [GPU support](./gpu.md) guide to install the drivers and
7070
additional software required to run TensorFlow on a GPU.
7171

72-
Note: This is only for 2.10 or earlier versions, 2.11 or later versions does not support GPU on native-Windows
72+
Note: GPU support on native-Windows is only available for 2.10 or earlier versions, starting in TF 2.11, CUDA build is not supported for Windows. For using TensorFlow GPU on Windows, you will need to build/install TensorFlow in WSL2 or use TensorFlow-DirectML-Plugin
7373

7474
### Download the TensorFlow source code
7575

@@ -174,17 +174,6 @@ Preconfigured Bazel build configs to DISABLE default on features:
174174
</pre>
175175
</section>
176176

177-
### Configuration options
178-
179-
For [GPU support](./gpu.md), specify the versions of CUDA and cuDNN. If your
180-
system has multiple versions of CUDA or cuDNN installed, explicitly set the
181-
version instead of relying on the default. `./configure.py` creates symbolic
182-
links to your system's CUDA libraries—so if you update your CUDA library paths,
183-
this configuration step must be run again before building.
184-
185-
Warning: TF-TRT Windows support is provided experimentally. No guarantee is made
186-
regarding functionality or engineering support. Use at your own risk.
187-
188177
## Build and install the pip package
189178

190179
The pip package gets built in two steps. A `bazel build` commands creates a
@@ -211,7 +200,7 @@ bazel build --config=opt //tensorflow/tools/pip_package:build_pip_package
211200

212201
#### GPU support
213202

214-
Note: This is only for 2.10 or earlier versions, 2.11 or later versions do not support GPU on native-Windows
203+
Note: GPU support on native-Windows is only available for 2.10 or earlier versions, starting in TF 2.11, CUDA build is not supported for Windows. For using TensorFlow GPU on Windows, you will need to build/install TensorFlow in WSL2 or use TensorFlow-DirectML-Plugin
215204

216205
To make the TensorFlow package builder with GPU support:
217206

@@ -318,7 +307,6 @@ Note: Starting in TF 2.11, CUDA build is not supported for Windows. For using Te
318307

319308
<table>
320309
<tr><th>Version</th><th>Python version</th><th>Compiler</th><th>Build tools</th></tr>
321-
<tr><td>tensorflow-2.12.0</td><td>3.8-3.11</td><td>MSVC 2019</td><td>Bazel 5.3.0</td></tr>
322310
<tr><td>tensorflow-2.11.0</td><td>3.7-3.10</td><td>MSVC 2019</td><td>Bazel 5.3.0</td></tr>
323311
<tr><td>tensorflow-2.10.0</td><td>3.7-3.10</td><td>MSVC 2019</td><td>Bazel 5.1.1</td></tr>
324312
<tr><td>tensorflow-2.9.0</td><td>3.7-3.10</td><td>MSVC 2019</td><td>Bazel 5.0.0</td></tr>
@@ -350,7 +338,7 @@ Note: Starting in TF 2.11, CUDA build is not supported for Windows. For using Te
350338
</table>
351339

352340
### GPU
353-
Note: Starting in TF 2.11, CUDA build is not supported for Windows. For using TensorFlow GPU on Windows, you will need to build/install TensorFlow in WSL2 or use TensorFlow-DirectML-Plugin
341+
Note: GPU support on native-Windows is only available for 2.10 or earlier versions, starting in TF 2.11, CUDA build is not supported for Windows. For using TensorFlow GPU on Windows, you will need to build/install TensorFlow in WSL2 or use TensorFlow-DirectML-Plugin
354342

355343
<table>
356344
<tr><th>Version</th><th>Python version</th><th>Compiler</th><th>Build tools</th><th>cuDNN</th><th>CUDA</th></tr>

0 commit comments

Comments
 (0)