New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compile using C++17 when using PyTorch 2.1 #3998
base: master
Are you sure you want to change the base?
Conversation
1643b4e
to
85db810
Compare
Unit Test Results (with flaky tests) 838 files - 50 838 suites - 50 8h 32m 33s ⏱️ - 26m 8s Results for commit 215b1f7. ± Comparison against base commit 9f88e1d. ♻️ This comment has been updated with latest results. |
Pinging @maxhgerlach to get some feedback, as I think this PR is quite important. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
And should we had plan to use C++17 instead of C++14 as the minimum required C++ standard?
Hi @thomas-bouvier @jiwq, can we prioritize merging this to fix #3996? |
Hi @maxhgerlach @EnricoMi @jiwq , #3996 seems to block all users with PT >= 2.1. Some CIs failed due to |
Has someone tested this? The installation still fails, though on a different issue:
Tested with # Use the official Python image as the base image
FROM python:3.10-slim-buster
# Update the system and install necessary libraries
RUN apt-get update && apt-get install -y \
build-essential \
cmake \
git \
curl \
ca-certificates \
libjpeg-dev \
libpng-dev && \
rm -rf /var/lib/apt/lists/*
# Install PyTorch
RUN pip install torch==2.1.0
# Install Horovod
-RUN HOROVOD_WITH_PYTORCH=1 pip install horovod==0.28.1
+RUN HOROVOD_WITH_PYTORCH=1 pip install git+https://github.com/thomas-bouvier/horovod.git@compile-cpp17 |
Looks like we have to build Gloo with C++17 as well: pytorch/pytorch#90448 (comment) |
Looks like there is some related code in Lines 377 to 393 in 7e4d993
@maxhgerlach any suggestions? |
There is some similar logic for tensorflow, which I have mimicked for Pytorch here: 9f7722d |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the latest patch. Thanks @EnricoMi catch the important issue.
Any suggestions how to debug why This can be tested by rebasing with master. |
Signed-off-by: Thomas Bouvier <contact@thomas-bouvier.io>
Signed-off-by: Enrico Minack <github@enrico.minack.dev>
55e4500
to
215b1f7
Compare
I guess #3979 needs to be merged to test against PyTorch 2.1. I will have a look at the bad alloc. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Any progress of this PR? |
Unfortunately, no progress so far. The blocker is a bad allocation |
Checklist before submitting
Description
The minimum required C++ version for compiling PyTorch 2.1 is C++17 (pytorch/pytorch#100557). This commit updates this requirement so that Horovod will also require C++17 if PyTorch >= 2.1.0.
Fixes #3996.
If you validate this change, I'll update the CHANGELOG accordingly.
Review process to land