I'm CS student. I'm just getting started in data science and machine learning. Can i use laptops with integrated graphics card in the data science and machine learning projects? Will pytorch and tensorflow work in this case?
2 Answers
All machine learning and Deep Learning frameworks take advantage of the multiple cores of the GPUs (CUDA) to make tensor calculations faster. The integrated graphics cards don't have CUDA support so the frameworks will use the CPU.
I recommend you to write this line in your code:
device = torch.device("cuda") if torch.cuda.is_available() else torch.device("cpu")
And send the processes to the device. Doing this PyTorch will use the GPU if it's available.
Yes. Do not worry about it. Pytorch uses your CPU by default. Tensorflow uses both your GPU and CPU, but it does not matter if it is integrated or not. Keep in mind that it will probably run slower than if you had a discrete graphics, but I assume that for your projects as a student, it will not matter much.
-
$\begingroup$ Thank you. I found project of the Microsoft that called tensorflow-directml (github.com/microsoft/tensorflow-directml) tensorflow-directml) . Did I understand correctly that I will be able to use the integrated GPU in the tensorflow? learn.microsoft.com/en-us/windows/ai/directml/… $\endgroup$– AlarCommented Jan 30, 2023 at 13:12