Easy guide to install GPU-enabled Tensorflow with Python 3.10 on native Windows, without dying of a headache. | by Claudio Córdova Lepe | Mar, 2024


I’ve been trying to install a version of TensorFlow that allows me to utilize my Nvidia GPU after switching my notebook. Due to the announcement that TensorFlow no longer supports native Windows starting from version 2.10, it became a headache of several days trying to accelerate my Deep Learning models in Jupyter using the GPU, given the plethora of conflicting information available online on how to install the corresponding CUDA and CUDNN libraries.

The existing alternative comes from using the Linux subsystem via WSL2. However, the performance in training Deep Learning models in Jupyter is often not as good due to constant kernel crashes and excessive RAM usage. Fortunately, after trying dozens of combinations of Python versions from 3.6 to 3.12, CUDNN, CUDA, TensorFlow, and TensorFlow-GPU, I managed to find the solution through the plugin developed by this person (bless their soul):

GitHub — microsoft/tensorflow-directml-plugin: DirectML PluggableDevice plugin for TensorFlow 2

As indicated in their guide, “TensorFlow is an end-to-end open source platform for machine learning. This repository is an implementation of TensorFlow’s Pluggable Device API that leverages DirectML to provide cross-vendor hardware acceleration on Windows 10 and the Windows Subsystem for Linux (WSL). TensorFlow with DirectML enables training and inference of complex machine learning models on a wide range of DirectX 12-compatible hardware.”

Using this library, not only was I able to enable the GPU easily, but the training performance is much superior to what can be achieved in WSL2 or with previous versions of TensorFlow because the utilization of GPU’s 3D rendering is better regulated and it utilizes both dedicated and shared GPU memory, and apparently also makes use of the integrated GPU in the processor, in this case, the Intel Iris XE.

Windows performance monitor during training of a GAN.



Source link

Be the first to comment

Leave a Reply

Your email address will not be published.


*