You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This code is a simple Python script that checks if CUDA is available on the system and provides instructions on how to enable it if it's not available.
4
+
"""
5
+
6
+
if__name__=="__main__":
7
+
print(torch.torch_version)
8
+
# Check if CUDA is available
9
+
iftorch.cuda.is_available():
10
+
print("CUDA is available!")
11
+
print(f"Number of GPUs: {torch.cuda.device_count()}")
print("1. **Install NVIDIA Drivers**: Ensure you have the latest NVIDIA drivers installed on your system.")
17
+
print("2. **Install CUDA Toolkit**: Download and install the CUDA Toolkit from the official NVIDIA website: https://developer.nvidia.com/cuda-downloads")
18
+
print("3. **Verify CUDA Installation**: After installation, verify that CUDA is working correctly by running the `nvidia-smi` command in your terminal/command prompt.")
19
+
print("4. **Update PyTorch**: Make sure you're using the latest version of PyTorch. You can update PyTorch using pip: `pip install --upgrade torch`")
20
+
print("5. **Restart Your System**: Restart your system to ensure that the changes take effect.")
0 commit comments