From 39dfe3a4d9e6f0f2ec9c343f24feb78ea7231877 Mon Sep 17 00:00:00 2001 From: David Rotermund <54365609+davrot@users.noreply.github.com> Date: Fri, 8 Dec 2023 14:37:48 +0100 Subject: [PATCH] Create README.md Signed-off-by: David Rotermund <54365609+davrot@users.noreply.github.com> --- pytorch/layers/cuda/README.md | 82 +++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 pytorch/layers/cuda/README.md diff --git a/pytorch/layers/cuda/README.md b/pytorch/layers/cuda/README.md new file mode 100644 index 0000000..9537071 --- /dev/null +++ b/pytorch/layers/cuda/README.md @@ -0,0 +1,82 @@ +## Cuda +{:.no_toc} + + + +## The goal + +Convince PyTorch and Nvidia's GPUs working together. **I assume you installed the PyTorch and/or TensorFlow version for CUDA. (see Python installation instructions on thsi site...)** + +Questions to [David Rotermund](mailto:davrot@uni-bremen.de) + +## Windows + +* Download and install [CUDA driver](https://developer.nvidia.com/cuda-downloads) +* Download and install [cuDNN toolkit](https://developer.nvidia.com/rdp/cudnn-download) (you will need to create an account :-( ) + +## Test the PyTorch + +```python +import torch +torch.cuda.is_available() +``` + +Expected output: + +```python +True +``` + +```python +torch.cuda.is_available() +``` + +Expected output: + +```python +True +``` + +```python +torch.backends.cuda.is_built() +``` + +Expected output: + +```python +True +``` + +```python +torch.backends.cudnn.version() +``` + +Expected output (number depends on the GPU generation and may be different): + +```python +8904 +``` + +```python +torch.backends.cudnn.enabled +``` + +Expected output: + +```python +True +``` + +```python +my_cuda_device = torch.device('cuda:0') +print(torch.cuda.get_device_properties(my_cuda_device)) +``` + +Expected output (values depend on the GPU generation): + +```python +_CudaDeviceProperties(name='NVIDIA GeForce RTX 3060', major=8, minor=6, total_memory=12011MB, multi_processor_count=28) +```