-
Notifications
You must be signed in to change notification settings - Fork 25k
Introduce math_compat.h for older Android versions #28567
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
Conversation
This pull request was exported from Phabricator. Differential Revision: D18099513 |
1f39782
to
70145ba
Compare
This pull request was exported from Phabricator. Differential Revision: D18099513 |
@gchanan , any concerns with the include in THNN/SoftPlus? |
Summary: Pull Request resolved: pytorch#28567 When building with Android NDK platforms prior to android-21, and when building for Android with libstdc++, there are some gaps in the C and C++ standard libraries. We use both for our internal 32-bit builds, so we need PyTorch to support this platform. All of the gaps are filled with this math_compat.h header, which needs to be included in any file that uses one of the functions that are not properly defined on Android. The file is a bit hack-tastic, but it is only used on a platform that is not receiving updates, so there shouldn't be a risk of breakage in the future. Test Plan: Internal android build. Differential Revision: D18099513 fbshipit-source-id: 253b6e5ea4677741f6caed28de708128f4e0913c
70145ba
to
a50c2a5
Compare
This pull request was exported from Phabricator. Differential Revision: D18099513 |
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.
@dreiss is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Summary: When building with Android NDK platforms prior to android-21, and when building for Android with libstdc++, there are some gaps in the C and C++ standard libraries. We use both for our internal 32-bit builds, so we need PyTorch to support this platform. All of the gaps are filled with this math_compat.h header, which needs to be included in any file that uses one of the functions that are not properly defined on Android. The file is a bit hack-tastic, but it is only used on a platform that is not receiving updates, so there shouldn't be a risk of breakage in the future. Pull Request resolved: pytorch/pytorch#28567 Test Plan: Internal android build. Differential Revision: D18099513 Pulled By: dreiss fbshipit-source-id: 020aab19c6fa083206310b018925d92275d4a548
Summary:
When building with Android NDK platforms prior to android-21,
and when building for Android with libstdc++, there are some
gaps in the C and C++ standard libraries. We use both for our
internal 32-bit builds, so we need PyTorch to support this platform.
All of the gaps are filled with this math_compat.h header, which
needs to be included in any file that uses one of the functions
that are not properly defined on Android. The file is a bit
hack-tastic, but it is only used on a platform that is not receiving
updates, so there shouldn't be a risk of breakage in the future.
Test Plan: Internal android build.
Differential Revision: D18099513