如何在spyder(anaconda3)中使用GPU运行python代码



我正试图使用我的GPU(Nvidia GeForce(在spyder中运行我的python代码,但我不知道该怎么做。

请帮忙!

在大多数情况下,您需要这些东西:

请确保您的GPU与以下各项兼容:https://developer.nvidia.com/cuda-gpus

下载Cuda工具包:https://developer.nvidia.com/cuda-downloads

您可以通过nvidia-smi命令检查它是否工作

安装conda install cudatoolkit

根据您的代码,您可能还需要conda install numba

同时结账:https://www.anaconda.com/blog/getting-started-with-gpu-computing-in-anaconda

如果你不使用anaconda,你可以通过pip结账下载软件包:https://documen.tician.de/pycuda/

最新更新