Skip to content

Commit

Permalink
Fixed horovod build
Browse files Browse the repository at this point in the history
  • Loading branch information
vfdev-5 authored Oct 2, 2024
1 parent 51c578c commit 52267e7
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions .github/workflows/hvd-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,6 @@ jobs:
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Setup tmate session
uses: mxschmitt/action-tmate@v3

- name: Install dependencies
shell: bash -l {0}
Expand All @@ -67,7 +64,20 @@ jobs:
#install other dependencies
pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu
pip install -r requirements-dev.txt
pip install git+https://github.com/horovod/horovod.git
# Install Horovod from source and apply a patch to build with recent pytorch
# We can't use pip install <whatever> as build-env can't find pytorch and
# `--no-build-isolation` does not work with horovod setup.py
git clone --recursive https://github.com/horovod/horovod.git /tmp/horovod
cd /tmp/horovod
sed -i "s/CMAKE_CXX_STANDARD 14/CMAKE_CXX_STANDARD 17/g" CMakeLists.txt
sed -i "s/CMAKE_CXX_STANDARD 14/CMAKE_CXX_STANDARD 17/g" horovod/torch/CMakeLists.txt
HOROVOD_WITH_PYTORCH=1 python setup.py install
cd -
# test the installation:
python -c "import horovod.torch as hvd; hvd.mpi_ops.Sum"
# Install ignite
python setup.py install
# Download MNIST: https://github.com/pytorch/ignite/issues/1737
Expand Down

0 comments on commit 52267e7

Please # to comment.