-
Notifications
You must be signed in to change notification settings - Fork 227
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
Fix libtorch static builds that regressed #1056
Conversation
Just today I wondered about this. Thank you! |
@seemethere @ezyang can you please help review or send to the right person ? |
@malfet can you take a look at this? |
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.
Hmm, where BUILD_STATIC
variable referenced on line 144 is defined? (Imo it should be BUILD_SHARED_VAR
shouldn't it?)
Also, we probably want to keep debug symbol information, but only for shared library builds (as static ones indeed can not be separated into library and debug symbols) |
libtorch-static used to ship libtorch.a until 1.0.1 and has regressed since forcing people to build from source. This fixes the build commands and add BUILD_SHARED_LIBS=OFF It turns off USE_TENSORPIPE until pytorch/tensorpipe#449 is fixed. Tested on my system to verify a libtorch.a is produced but can't test the CI
Friendly ping to review. Thanks thanks |
thanks @ezyang |
Reverting as it broke all static builds in nightlies, see https://hud.pytorch.org/pytorch/pytorch/commit/a4fa62064e1863d108c655f541bce4d806cf1823 |
here's the error (string interpolation in ninja?)
|
This reverts commit 17bfd84.
Any ideas on what went wrong here ? The same command works ok on couple systems i tried. Is the build.ninja file available somewhere ? |
I have isolated the breakage to USE_MKL / USE_MKLDNN generating wrong Ninja rules like I have filed pytorch/pytorch#80012 to fix the issue in PyTorch but will land a fix for static builds with MKL disabled for now until it is fixed. |
Prior attempt to land was reverted due to a failure with MKLDNN pytorch#1056 Disable MKLDNN in static builds until it is fixed. It is tracked in pytorch/pytorch#80012 TEST: With and without MKLDNN to recreate the last failure and test that it builds without MKLDNN.
Prior attempt to land was reverted due to a failure with MKLDNN #1056 Disable MKLDNN in static builds until it is fixed. It is tracked in pytorch/pytorch#80012 TEST: With and without MKLDNN to recreate the last failure and test that it builds without MKLDNN.
Prior attempt to land was reverted due to a failure with MKLDNN pytorch#1056 Disable MKLDNN in static builds until it is fixed. It is tracked in pytorch/pytorch#80012 TEST: With and without MKLDNN to recreate the last failure and test that it builds without MKLDNN.
libtorch-static used to ship libtorch.a until 1.0.1 and has
regressed since forcing people to build from source.
This fixes the build commands and add BUILD_SHARED_LIBS=OFF
It also removes build it as a debug build, and turns off
USE_TENSORPIPE until pytorch/tensorpipe#449
is fixed.
Tested on my system to verify a libtorch.a is produced but can't
test the CI
Fixes: pytorch/pytorch#70898