Skip to content

[Driver][SYCL] Enable generation of spv based fat objects #4608

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 4 commits into from
Jan 11, 2022

Conversation

mdtoguchi
Copy link
Contributor

When generating fat objects with -fsycl, our default behavior is to
generate and store the LLVM-IR for the device side compilation. Update
the behavior, introducing -fsycl-device-obj=arg (where arg is spirv or
llvmir) to create the desired 'object' contents.

This is a precursor to the enabling the ability to consume these spv
based objects (or llvm-ir) seamlessly.

When generating fat objects with -fsycl, our default behavior is to
generate and store the LLVM-IR for the device side compilation.  Update
the behavior, introducing -fsycl-device-obj=arg (where arg is spirv or
llvmir) to create the desired 'object' contents.

This is a precursor to the enabling the ability to consume these spv
based objects (or llvm-ir) seamlessly.
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.

How exactly is this option going to be different from -f[no-]sycl-use-bitcode? Should the use-cases for the 2 options collide, is there a planned roadmap for deprecating the old interface/differentiating the functionality?

@mdtoguchi
Copy link
Contributor Author

How exactly is this option going to be different from -f[no-]sycl-use-bitcode? Should the use-cases for the 2 options collide, is there a planned roadmap for deprecating the old interface/differentiating the functionality?

My changes actually alias -fsycl-use-bitcode to the new option. I like the idea of deprecating -fsycl-use-bitcode in favor of this new option. The naming of -fno-sycl-use-bitcode is not very good for the idea of actually creating the fat objects.

@mdtoguchi mdtoguchi marked this pull request as draft September 21, 2021 14:39
@mdtoguchi
Copy link
Contributor Author

Moved to draft. Exposing the functionality of creating the fat objects with SPIR-V should only occur once we can properly consume both LLVM-IR and SPIR-V type fat objects seamlessly.

@mdtoguchi mdtoguchi marked this pull request as ready for review December 21, 2021 18:53
@mdtoguchi mdtoguchi requested a review from AGindinson December 24, 2021 16:23
@mdtoguchi
Copy link
Contributor Author

@AGindinson, can you take a look? This is part of the larger SPIR-V to LLVM-IR change.

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.

Mostly LGTM. Do I understand correctly that #5251 should go in first?

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.

Approving for merge after #5251.

@mdtoguchi mdtoguchi requested a review from a team January 11, 2022 00:32
@bader bader merged commit 1e94ef3 into intel:sycl Jan 11, 2022
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.

3 participants