Data Scientist

CUDA+CuDNN+TF_Setting

 


 

Intro

The professor requests the installation of the CUDA environment on the server computer.

 


 

Table

  1. Visual Studio  

  2. Anaconda  

  3. Device Specification

  4. CUDA and cuDNN  

  5. TENSORFLOW  

  6. PyTorch  

 


1. Visual Studio

Compiler_IDE_Native  

 Visual Studio 2022 17.0 community product not found  

Uncertainty of higher version[ex)17.6] VScode stability and reliability  

Choose to install VScode 2019 community product instead.  

Visual_Studio_2019_installer_download


2. Anaconda  

https://www.anaconda.com/ 

Anaconda_installer_download

Installed with no specific changes

Anaconda Virtual Environment setting  


(base) PS C:\Users\ParkLab> conda create -n tf310 python=3.10

(base) PS C:\Users\ParkLab> conda activate tf310

(tf310) PS C:\Users\ParkLab>


3. Device Specification

Device Manager >  

Device_Manager 

NVIDIA RTX A6000 (Quadro)  


4. CUDA and CuDNN  

NVIDIA Driver Download

https://www.nvidia.com/Download/index.aspx?lang=kr  

NVIDIA_driver_download_1

NVIDIA_driver_download_2 

NVIDIA_driver_install_1

NVIDIA_driver_install_2 NVIDIA_driver_install_3

CUDA - GPU match

https://www.wikiwand.com/en/CUDA#GPUs_supported  

Compute Capability check

Compute_Capability_check

Micro-architecture : Ampere  

Compute capability: 8.6  

GPUs_supported

Available CUDA SDK version : 11.1-11.4  

Fixed CUDA ver. - 11.2  

CUDA Installation

CUDA toolkit archive   https://developer.nvidia.com/cuda-toolkit-archive

CUDA-11.2   https://developer.nvidia.com/cuda-11.2.0-download-archive  

CUDA_11.2_toolkit_download_1 CUDA_11.2_toolkit_download_2 CUDA_11.2_toolkit_install_1  CUDA_11.2_toolkit_install_2  CUDA_11.2_toolkit_install_3  CUDA_11.2_toolkit_install_4 

cuDNN Installation

cuDNN_v8.1.0_install_1 

install available after login
https://en.wikipedia.org/wiki/Quadro

cuDNN_v8.1.0_install_2 

extract zip file

cuDNN_v8.1.0_install_3 

cuDNN_v8.1.0_install_4  cuDNN_v8.1.0_install_5 


5. TENSORFLOW  

Tensorflow - CUDA build configuration
https://www.tensorflow.org/install/source_windows?hl=en#gpu
TF_CUDA_cuDNN 

TF-2.10.0
CUDA 11.2
cuDNN 8.1
tensorflow installation

(tf310) PS C:\Users\ParkLab> conda install tensorflow==2.10.0

but by unknown reason, When I install tensorflow with conda command, (conda install tensorflow==2.10.0), it couldn’t find GPU device via tensorflow. I changed installation option to pip.

(tf310) C:\Windows\system32>conda uninstall tensorflow 
(tf310) C:\Windows\system32>pip install tensorflow==2.10.0 
(tf310) C:\Windows\system32>pip install brotli

Tensorflow GPU device connection check

(tf310) C:\Windows\system32>python Python 3.10.11 | packaged by Anaconda, Inc. | (main, Apr 20 2023, 18:56:50) [MSC v.1916 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. 
>>> import tensorflow as tf 
>>> tf.test.is_built_with_cuda() 
True 
>>> tf.config.list_physical_devices('GPU') [PhysicalDevice(name='/physical_device:GPU:0', device_type='GPU'), PhysicalDevice(name='/physical_device:GPU:1', device_type='GPU')]

6. PyTorch  

create new environment for PyTorch option.

(base) C:\Users\ParkLab>conda create -n pt39 python==3.9 
(base) C:\Users\ParkLab>conda activate pt39 
(pt39) C:\Users\ParkLab>conda pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu111

Installation details:
torch-1.10.2+cu111
torchvision-0.10.1+cu111
torchaudio-0.10.1+cu111

(pt39) C:\Users\ParkLab>python Python 3.9.16 (main, Mar 8 2023, 10:39:24) [MSC v.1916 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. 
>>> import torch 
>>> torch.cuda.is_available() 
True

🎉Complete setting Deep learning environment
on a LAB computer which costs more than $15,000🎉


BANDALCOM🐻