到目前为止,我一直在使用 Tensorflow-GPU,通过 pip 以及 Nvidia 网站上的 Cuda 相关软件和 Nvidia 软件/驱动程序安装它强>.最近发现使用conda install tensorflow-gpu
也安装了cudatoolkit和cudnn.
Till date, I have been using Tensorflow-GPU by installing it using pip and the Cuda related software and Nvidia softwares/drivers from Nvidia's website. Recently, I found that using conda install tensorflow-gpu
also installs cudatoolkit and cudnn.
那么,这些(conda 提供的)与我从 Nvidia 网站下载的有什么不同?
So, how are these(the ones provided by conda) different from the ones that I downloaded from Nvidia's website?
在我的第一个(以前的)环境中,conda list
显示我只安装了 TensorFlow(来自 PyPi),没有安装 cudnn/cudatoolkit,但一切正常.
In my first (previous) environment, conda list
showed that I have installed only TensorFlow(from PyPi) and no cudnn/cudatoolkit, but still everything worked.
另外,在我运行 conda install tensorflow-gpu
的新环境中,conda list
显示 tensorflow-gpu 已安装以及 Anaconda 的 cudatoolkit 和 cudnn.在这种环境下,一切正常.
Also, in a new environment in which I ran conda install tensorflow-gpu
, conda list
showed me tensorflow-gpu has been installed along with cudatoolkit and cudnn by Anaconda. And in this environment also, everything worked fine.
这是否意味着,如果我使用 pip 安装 TensorFlow,则仅需要从 Nvidia 网站下载和安装 Cuda?
So does this mean, that downloading and installing Cuda from Nvidia's website is only necessary if I use pip to install TensorFlow?
如果使用 anaconda 安装 tensorflow-gpu,是的,它会在与 tensorflow-gpu 相同的 conda 环境中为您安装 cuda 和 cudnn.您只需要自己安装最新的 nvidia 驱动程序(以便它适用于最新的 CUDA 级别和您使用的所有旧 CUDA 级别.)
If using anaconda to install tensorflow-gpu, yes it will install cuda and cudnn for you in same conda environment as tensorflow-gpu. All you need to install yourself is the latest nvidia-driver (so that it works with the latest CUDA level and all older CUDA levels you use.)
这比 pip install tensorflow-gpu 方法有很多优点:
This has many advantages over the pip install tensorflow-gpu method:
与 pip install tensorflow-gpu 相比的缺点是,在 Anaconda 能够更新 conda 配方并发布其最新 TensorFlow 版本的构建之前几周,最新版本的 tensorflow 被添加到 pypi.
The disadvantage when compared to pip install tensorflow-gpu, is the latest version of tensorflow is added to pypi weeks before Anaconda is able to update the conda recipe and publish their builds of the latest TensorFlow version.
这篇关于Nvidia Cudatoolkit 与 Conda Cudatoolkit的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!