1 min read 24 words Updated Oct 03, 2026 Created Oct 03, 2026
#AI#CUDA#python#pytorch

Check if CUDA works properly:

import torch 

torch.cuda.is_available()

Or simply create a tensor on the GPU:

tensor = torch.tensor([1.0, 2.0]).cuda()