Skip to content

[Driver][SYCL] Enable ability to consume fat objects containing SPIR-V #5251

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

Merged
merged 6 commits into from
Jan 11, 2022

Conversation

mdtoguchi
Copy link
Contributor

@mdtoguchi mdtoguchi commented Dec 30, 2021

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 spirv-to-ir-wrapper to potentially
convert them to LLVM-IR before performing the device link.

Toolchain flow will resemble:
fat object
|
unbundle
|
+-------+------+
| |
spirv-to-ir |
| |
llvm-link |
| |
wrap |
| |
+-------+------+
|
link

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 spirv-to-ir-wrapper to potentially
convert them to LLVM-IR before performing the device link.

Toolchain flow will resemble:

          fat object
              |
           unbundle
              |
      +-------+------+
      |              |
  spirv-to-ir        |
      |              |
  llvm-link          |
      |              |
    wrap             |
      |              |
      +-------+------+
              |
             link
@mdtoguchi mdtoguchi requested a review from a team as a code owner December 30, 2021 20:49
@AGindinson
Copy link
Contributor

/summary:run

Copy link
Contributor

@AGindinson AGindinson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM aside from a few minor comments.

As far as E2E testing is concerned, I believe that Precommit & Summary tests include sufficient uses of fat object usage to serve as regression checks. It would make sense to introduce explicit E2E tests for SPIR-V containing objects; however, with the level of unit testing for the current PR + spirv-to-ir-wrapper LITs, absence of E2E shouldn't be a severe blocker.

UPD: Obviously, a better moment for E2E test introduction would be once the generation of SPV-based objects is enabled. I've somehow forgotten that it's still ahead :D

@mdtoguchi mdtoguchi requested a review from AGindinson January 4, 2022 22:51
@mdtoguchi
Copy link
Contributor Author

Hoping folks are back from Holiday to take a look for merging. Is anybody from @intel/llvm-gatekeepers around?

@pvchupin pvchupin merged commit c878063 into intel:sycl Jan 11, 2022
@bader
Copy link
Contributor

bader commented Jan 11, 2022

Toolchain flow will resemble:
fat object
|
unbundle
|
+-------+------+
| |
spirv-to-ir |
| |
llvm-link |
| |
wrap |
| |
+-------+------+
|
link

@pvchupin, @mdtoguchi, I think we should update the design document. The diagrams in https://github.com/intel/llvm/blob/sycl/sycl/doc/CompilerAndRuntimeDesign.md#dpc-compiler-architecture section seem outdated.

@mdtoguchi
Copy link
Contributor Author

More specifically: https://github.com/intel/llvm/blob/sycl/sycl/doc/CompilerAndRuntimeDesign.md#separate-compilation-and-linking should be augmented to reflect the ability to create fat objects with SPIR-V instead of LLVM-IR as well as consume.

@pvchupin
Copy link
Contributor

@mdtoguchi, can you follow up on this update please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants