当前位置: 首页 > 工具软件 > Horovod > 使用案例 >

horovod安装

林英朗
2023-12-01

 

linux:

pip install horovod

pip install horovod --no-cache-dir

HOROVOD_WITH_MXNET=1 pip install horovod[mxnet]

HOROVOD_WITH_MXNET=1 pip install horovod[mxnet]==0.19 --no-cache-dir

 

下载自己安装:

https://pypi.org/project/horovod/#files

 

python setup.py build --force develop

 

并不是所有版本都支持,支持的版本说明:

https://horovod.readthedocs.io/en/latest/install_include.html

 

frameworks:

$ pip install horovod[tensorflow,keras,pytorch,mxnet,spark]

In addition to specifying framework requirements individually, you can require all frameworks collectively:

$ pip install horovod[all-frameworks]

This is useful when building Horovod as part of a larger collection of dependencies at once, relying on the pip compiler to determine the correct install order.

TensorFlow

To ensure that Horovod is built with TensorFlow support enabled:

$ HOROVOD_WITH_TENSORFLOW=1 pip install horovod[tensorflow]

To skip TensorFlow, set HOROVOD_WITHOUT_TENSORFLOW=1 in your environment.

If you’ve installed TensorFlow from PyPI, make sure that the g++-4.8.5 or g++-4.9 or above is installed.

PyTorch

To ensure that Horovod is built with PyTorch support enabled:

$ HOROVOD_WITH_PYTORCH=1 pip install horovod[pytorch]

To skip PyTorch, set HOROVOD_WITHOUT_PYTORCH=1 in your environment.

If you’ve installed PyTorch from PyPI, make sure that the g++-4.9 or above is installed.

MXNet

To ensure that Horovod is built with MXNet CPU support enabled:

$ HOROVOD_WITH_MXNET=1 pip install horovod[mxnet]

Some MXNet versions do not work with Horovod:

  • MXNet 1.4.0 and earlier have GCC incompatibility issues. Use MXNet 1.4.1 or later with Horovod 0.16.2 or later to avoid these incompatibilities.

  • MXNet 1.5.1, 1.6.0, 1.7.0, and 1.7.0.post1 are missing MKLDNN headers, so they do not work with Horovod. Use 1.5.1.post0, 1.6.0.post0, and 1.7.0.post0, respectively.

  • MXNet 1.6.0.post0 and 1.7.0.post0 are only available as mxnet-cu101 and mxnet-cu102.

To skip MXNet, set HOROVOD_WITHOUT_MXNET=1 in your environment.

Keras

Standalone Keras support is currently only available for the TensorFlow backend.

To ensure that Horovod is built with Keras support available:

$ HOROVOD_WITH_TENSORFLOW=1 pip install horovod[tensorflow,keras]

There are no plugins built for Keras, but the TensorFlow plugin must be enabled in order to use Horovod with Keras.

Spark

Horovod can be used with Spark in combination with any of the frameworks above.

To ensure Horovod has all the necessary requirements in order to run on top of Spark:

$ pip install horovod[spark]
 类似资料: