-
Notifications
You must be signed in to change notification settings - Fork 62
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
[ML] Avoiding C++17 warnings for Windows builds #2120
Comments
Eigen 3.4.0 has better support for more modern C++ language features and as such quietens a few C++17 deprecation warnings encountered with version 3.3.7. Relates to elastic#2120
Eigen 3.4.0 has better support for more modern C++ language features and as such quietens a few C++17 deprecation warnings encountered with version 3.3.7. Note that Eigen 3.4.0 handles NaN values more robustly than in previous versions. Ensure to check the result of JacobiSVD::compute before proceeding to avoid working with uninitialised values. Relates to #2120
The deprecation warning from Boost unordered detail will be fixed in an upcoming major reworking of the |
An issue has been opened on the PyTorch repo detailing the deprecation warnings we are seeing - pytorch/pytorch#69290. |
On Windows a number of deprecation warnings are seen emanating from PyTorch header files (See elastic#2120). An issue has been opened on the PyTorch repo requesting that these deprecations be addressed (pytorch/pytorch#69290). While the issue has been triaged it is suspected that it will be some time before fixes are forthcoming. These changes silence such deprecation warnings for pytorch_inference only.
On Windows a number of deprecation warnings are seen emanating from PyTorch header files (See #2120). An issue has been opened on the PyTorch repo requesting that these deprecations be addressed (pytorch/pytorch#69290). While the issue has been triaged it is suspected that it will be some time before fixes are forthcoming. These changes silence such deprecation warnings for pytorch_inference only.
In PyTorch 2.1 they're using C++17 - see pytorch/pytorch#100557 - so the PyTorch side of this should no longer be a problem after #2587. |
@edsavage can we close this one yet? |
Yes, this one can now be closed. However, I do notice a number of new warnings in the Windows build logs, mostly related to |
These remaining warnings have been addressed by #2653, hence this issue can now be closed. |
Our Windows build logs are currently warning of a number of C++ features we are using that are deprecated in C++17 and removed in C++20. We should try to stop using these before we upgrade to C++20 (although if we cannot then it may be possible to continue to use the deprecated features by defining certain macros).
In our own code we have:
These should be easy to avoid by changing our code to comply with C++20.
In Boost we have:
For the
boost::variant
problem we should be able to switch tostd::variant
to avoid it. Our files that useboost::variant
are:std::variant
is not exactly the same asboost::variant
, but it's close, so hopefully it won't be too much work to switch.For the other Boost issue in the unordered detail, there's an issue open for it and somebody said they would fix it on a mailing list. They didn't follow up on their promise, but since it sounds like a 1 or 2 line fix and the mailing list states exactly what to do maybe we can contribute the fix to Boost.
Then there are a couple of issues with Eigen:
Possibly we can upgrade Eigen to avoid these, or, if not, maybe we can contribute a fix there too.
Finally, there are a number of issues in PyTorch:
PyTorch itself builds with C++14, so won't see these. We want their headers to also work when we include them in C++20 code. Probably the first step is to see if there's already an issue open against PyTorch for this and open one if not. If it's too controversial for them to adjust their code to be compatible with C++20 then maybe this is where we can use the macros for allowing removed features to still be used, i.e. define
_HAS_FEATURES_REMOVED_IN_CXX20
, but only when buildingpytorch_inference
.The text was updated successfully, but these errors were encountered: