-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Delete build_caffe2.sh, replace with build_libtorch.py #10508
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
5f5eb70 to
d0bdaef
Compare
as suggested by peter (and copy-pasted from his draft PR). This ensures that all consumers of the torch CMake file go through as unified a path as possible. In order to change the surrounding infrastructure as little as possible, I made some tweaks to enable build_pytorch_libs.sh to generate the test binaries relative to the current directory, rather than hardcoding to pytorch/build.
d0bdaef to
3c5ee4f
Compare
|
@ezyang @goldsborough this is ready for your attention |
goldsborough
left a comment
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.
LGTM
| my_env["BUILD_TORCH"] = "ON" | ||
|
|
||
| if subprocess.call(build_libs_cmd + libs, env=my_env) != 0: | ||
| try: |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
| build_libs_cmd = ['tools\\build_pytorch_libs.bat'] | ||
| else: | ||
| build_libs_cmd = ['bash', 'tools/build_pytorch_libs.sh'] | ||
| build_libs_cmd = ['bash', os.path.join('..', 'tools', 'build_pytorch_libs.sh')] |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
| WERROR=1 VERBOSE=1 tools/cpp_build/build_caffe2.sh "$CPP_BUILD" | ||
| mkdir -p $CPP_BUILD/caffe2 | ||
|
|
||
| BUILD_LIBTORCH_PY=$PWD/tools/build_libtorch.py |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
| except OSError: | ||
| pass | ||
|
|
||
| kwargs = {'cwd': 'build'} if not IS_WINDOWS else {} |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
ezyang
left a comment
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 deleting files.
|
see also #10562 to track some related future improvements |
facebook-github-bot
left a comment
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.
anderspapitto is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
| WERROR=1 VERBOSE=1 tools/cpp_build/build_caffe2.sh "$PWD/../cpp-build" | ||
| BUILD_LIBTORCH_PY=$PWD/tools/build_libtorch.py | ||
| mkdir -p ../cpp-build/caffe2 | ||
| pushd ../cpp-build/caffe2 |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
delete build_caffe2.sh, replace with build_libtorch.py as suggested by peter (and copy-pasted from his draft PR). This ensures that all consumers of the torch CMake file go through as unified a path as possible.
In order to change the surrounding infrastructure as little as possible, I made some tweaks to enable build_pytorch_libs.sh to generate the test binaries relative to the current directory, rather than hardcoding to pytorch/build.