如果安装在 VM 上,TensorFlow 会在 Mac 上使用 GPU 吗?
Would TensorFlow utilize GPU on a Mac if installed on a VM?
来自 TensorFlow 的 "Getting Started" 页面:
# Only CPU-version is available at the moment.
$ pip install https://storage.googleapis.com/tensorflow/mac/tensorflow-0.5.0-py2-none-any.whl
我不太熟悉使用 GPU 或 CUDA 库,但是如果我在 Linux VM 中安装了 TensorFlow(比如通过 Vagrant 可用的 precise32),那么 TensorFlow 会利用 GPU当 运行 在该 VM 中时?
可能不会。 VirtualBox,例如,does not support PCI Passthrough on a MacOS host, only a Linux host(即便如此,我还是......呃,我不会抱太大希望)。 MacOS 最终与其 GPU 紧密集成,以至于我非常怀疑此时任何 VM 都可以做到这一点。
作为更新:Tensorflow 现在可以在 Mac OS X 上使用 GPU。相关的 PR 是 https://github.com/tensorflow/tensorflow/pull/664 并且在 brew install coreutils
之后是 Linux安装 'build from source' 说明应该有效。与使用 NVIDIA gforce 960 和 Intel i7-6700K 的 CPU 版本相比,我看到了 10 倍的加速。
编辑/(更新?):从 MacOS Mojave 开始,由于一些 API 更改以及 Apple 和 NVidia 之间似乎存在的一些长期矛盾,驱动程序NVidia 显卡不再可用。没有 NVidia 就意味着没有 Cuda 就意味着没有 Tensorflow,也没有任何其他值得尊敬的机器学习。看起来像 Google 协作是目前的方式。
来自 TensorFlow 的 "Getting Started" 页面:
# Only CPU-version is available at the moment.
$ pip install https://storage.googleapis.com/tensorflow/mac/tensorflow-0.5.0-py2-none-any.whl
我不太熟悉使用 GPU 或 CUDA 库,但是如果我在 Linux VM 中安装了 TensorFlow(比如通过 Vagrant 可用的 precise32),那么 TensorFlow 会利用 GPU当 运行 在该 VM 中时?
可能不会。 VirtualBox,例如,does not support PCI Passthrough on a MacOS host, only a Linux host(即便如此,我还是......呃,我不会抱太大希望)。 MacOS 最终与其 GPU 紧密集成,以至于我非常怀疑此时任何 VM 都可以做到这一点。
作为更新:Tensorflow 现在可以在 Mac OS X 上使用 GPU。相关的 PR 是 https://github.com/tensorflow/tensorflow/pull/664 并且在 brew install coreutils
之后是 Linux安装 'build from source' 说明应该有效。与使用 NVIDIA gforce 960 和 Intel i7-6700K 的 CPU 版本相比,我看到了 10 倍的加速。
编辑/(更新?):从 MacOS Mojave 开始,由于一些 API 更改以及 Apple 和 NVidia 之间似乎存在的一些长期矛盾,驱动程序NVidia 显卡不再可用。没有 NVidia 就意味着没有 Cuda 就意味着没有 Tensorflow,也没有任何其他值得尊敬的机器学习。看起来像 Google 协作是目前的方式。