Repository navigation
[BE]: Try turning on LTO in CMake in CI - #137866
Skylion007 wants to merge 9 commits into
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/137866
Note: Links to docs will display an error until the docs builds have been completed. ❌ 12 New Failures, 1 Unrelated FailureAs of commit 3f4fd0b with merge base c1c8c1f ( NEW FAILURES - The following jobs have failed:
UNSTABLE - The following job is marked as unstable, possibly due to flakiness on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
fccff69 to
6d1ca1b
Compare
|
So seems to have some fun complications. Some version of clang's LLD linker are too old to link some of the GCC prebuilt binaries. On the other hand, clang-10 and below doesn't come with anyway plugins for Alternatively, I am failing to override the linker properly in one place, which could also be possible. |
There was a problem hiding this comment.
How can In install llvmGold.so in versions less than llvm-11?
There was a problem hiding this comment.
I am not, but clang-10 doesn't seem to properly ship the binary llvmGold.so or at the very least it's installed in the wrong place and not found by the linker.
bb1f19a to
cae09eb
Compare
|
@cyyever Any thoughts here on how to properly enable LTO on Clang workflows? |
cae09eb to
7311b07
Compare
|
Okay, XNNPACK has a few warnings treated as errors blocking LTO, but they are relatively straightforward fixes: |
Maybe a possible version?: |
|
I agree, the point is to work out a quick version of LTO and see what tests break |
|
Oh it's supported alright, the issue is with the linker plugin not being properly distributed in the binary until clang version 11 or newer. There is one binary dependency that is built with a newer linker (which doesn't seem to phase GNU linkers, but fails an assert for LLD unless a more recent one is used). |
|
Updating to clang11 minimum would likely fix all the other issues since we could use the linker tools apt-get package which is available for llvm 11 and newer |
|
Switching to lld breaks inductor interestingly enough it seems |
|
I worked around the GCC warning, and now I hit assembler errors (likely due to LTO optimizing away some important symbols or other bugs in the compile toolchain). Fun... |
|
Updating our minimum clang version even to 11 and installing the GNU linker plugins so we can use |
|
@cyyever The undefined reference stuff seems like stuff you were investigating with the static function / C10_API if you are interested |
|
@pytorchbot rebase -b main |
merged |
|
@pytorchbot started a rebase job onto refs/remotes/origin/main. Check the current status here |
|
Successfully rebased |
0ebfd83 to
92bb1f2
Compare
|
@Skylion007 clang-lld installation can be submitted in other PR to avoid rebuilding images each time? |
|
@Skylion007 No idea now, but I can try it on the local host and observe how to fix |
|
@pytorchbot rebase |
|
@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here |
|
Rebase failed due to Command |
9a77c3a to
f992c32
Compare
|
@cyyever The external symbol errors from VSCode are interesting... Does this have to do with your recent symbol PRs? |
|
Looks like this PR hasn't been updated in a while so we're going to go ahead and mark this as |
|
@pytorchbot rebase |
|
@pytorchbot rebase |
|
@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here |
|
Rebase failed due to Command |
|
@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here |
|
Rebase failed due to Command |
Fixes #ISSUE_NUMBER
This will very likely not work, but let's see.
cc @jgong5 @mingfeima @XiaobingSuper @sanchitintel @ashokei @jingxu10