Skip to content

Build libtorch with new gcc ABI #335

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

Merged
merged 33 commits into from
Aug 14, 2019
Merged

Build libtorch with new gcc ABI #335

merged 33 commits into from
Aug 14, 2019

Conversation

yf225
Copy link
Contributor

@yf225 yf225 commented Aug 7, 2019

@yf225 yf225 changed the title Build libtorch with new gcc ABI [WIP] Build libtorch with new gcc ABI Aug 7, 2019
if [[ -z "$1" || "$1" == 0 || "$1" == "OFF" ]]; then
echo 1

# NOTE [ Building libtorch with old vs. new gcc ABI ]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any substantive changes here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no substantive change here. The only main change is that we are only checking for cxx11 / pre-cxx11 symbols in our own namespaces (i.e. c10 / at / caffe2 / torch), since checking for those symbols in all namespaces doesn't give us reliable results:

  # NOTE: Checking the above symbols in all namespaces doesn't work, because
  # devtoolset7 always produces some cxx11 symbols even if we build with old ABI,
  # and CuDNN always has pre-cxx11 symbols even if we build with new ABI using gcc 5.4.
  # Instead, we *only* check the above symbols in the following namespaces:

@yf225 yf225 changed the title [WIP] Build libtorch with new gcc ABI Build libtorch with new gcc ABI Aug 12, 2019
Copy link
Member

@soumith soumith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks reallly good overall! thanks.

@soumith soumith merged commit d7348b4 into pytorch:master Aug 14, 2019
facebook-github-bot pushed a commit to pytorch/pytorch that referenced this pull request Aug 19, 2019
Summary:
This PR enables building libtorch with new ABI, using gcc 5.4 on Ubuntu 16.04.

Accompanying PR: pytorch/builder#335.
Pull Request resolved: #23908

Differential Revision: D16898009

Pulled By: yf225

fbshipit-source-id: 516b444c1fc94c7b05d3be84ef81ef23e9041bfc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants