-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathInstall_Cuda_guide.txt
51 lines (25 loc) · 1.33 KB
/
Install_Cuda_guide.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
******************** Rough Guide to install CUDA on your device (works only with PyTorch) ********************
Step1: Go to this link "https://developer.nvidia.com/cuda-downloads?target_os=Windows&target_arch=x86_64&target_version=10"
and select your OS along with the installer type (local is recommended).
Step2: The downloaded file will be an executable. Run it and it will unpack all the files into your drive.
Step3: Go to "https://pytorch.org/get-started/locally/" and select the OS and dependencies and select PIP(recommended) and copy the command into your virtual environment.
. Command to create a virtual env - " python -m venv *env_name* "
. To activate it - " *env_name*\Scripts\activate.bat "
Step4: Once its done, select the virtual environment and run the following command in a file,
"
import torch
print("Torch using cuda: ", torch.cuda.is_available())
"
If it returns True, then its successfull.
Other useful commands regarding GPU info :
import torch
# How many GPUs are there?
print(torch.cuda.device_count())
# Which GPU Is The Current GPU?
print(torch.cuda.current_device())
# Get the name of the current GPU
print(torch.cuda.get_device_name(torch.cuda.current_device()))
# Is PyTorch using a GPU?
print(torch.cuda.is_available())
++++++++++++++++++ With Tensorflow ++++++++++++++++++
*Future work*