-
Notifications
You must be signed in to change notification settings - Fork 787
Spir to ir tool branch #5175
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
Closed
Closed
Spir to ir tool branch #5175
Conversation
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
Tool name: spir-to-ir Function: Provides an interface used within the compiler driver toolchain which converts SPIR-V to LLVM-IR. Using llvm-spirv as the main conversion tool, the purpose of this is to be able to take binaries and convert them to LLVM-IR. The conversion only takes place if the input is SPIR-V, and if the LLVM-IR is provided it is simply copied and passed through. This tool is useful for handling generated fat objects/archives that contain SPIR-V as opposed to typical LLVM-IR. We do not now the type of files within the device objects, so we use this tool to make sure that file consumed after unbundling is always LLVM-IR. Example usage: spir-to-ir input.spv -o output.bc // creates LLVM-IR output.bc spir-to-ir input.bc -o output.bc // no conversion, creates output.bc
When a user creates objects/archives based off of -fsycl-device-obj=spirv we want to be able to consume these objects seamlessly. After any objects are unbundled, we will pass these through spir-to-ir-wrapper to potentially convert them to LLVM-IR before performing the device link. Toolchain flow will resemble: fat object | unbundle | +-------+------+ | | spir-to-ir | | | llvm-link | | | wrap | | | +-------+------+ | link
@AGindinson, I wanted to get this up so you can take a look at what I'm trying to do. I haven't made any adjustments to tests yet so I know those need to be updated. |
Closing this one in favor of: #5251 |
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.
No description provided.