Improve Offload artifact creation - #162305
Draft
ZuseZ4 wants to merge 2 commits into
Draft
Conversation
Previously, we'd generate one host.o per CGU, overwriting each other. We then would generate one more host.o during the final fat-lto run, which was the one we ended up using. Move the host handling code, so we stop generating the per-cgu host.o files that got overwritten anyway
The Device pass mainly creates a `device.bin` artifact. It previously did that once per CGU, with the last one surviving. By coincidence that usually worked. On the host side we solved that by enforcing fat-lto. On the device, we might not have fat-lto (e.g. if built as an rlib), and this one is the smaller correctness fix for now.
Collaborator
|
The job Click to see the possible cause of the failure (guessed by this bot) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I think the underlying problem is that we don't treat these artifacts (especially device.bin, less the Host Manifest) as proper rust options to
--emit. We could change that, but I'm not sure if it's the right path forward, given that it's just a glorified bit code wrapper. I feel like we can probably drop it (along with using some LLVM APIs) by just passing the bitcode files around. I mainly need to figure out which other tooling we might have access too if we keep following their bundle workflow.