Skip to content

[SYCL][RTC] Preliminary support for ESIMD kernels #16222

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 5 commits into from
Dec 4, 2024

Conversation

jopperm
Copy link
Contributor

@jopperm jopperm commented Dec 2, 2024

Adds support for compiling source strings that contain ESIMD kernels only, hence require no device splitting. I'm using a simplified version of the driver logic in sycl-post-link. The pass pipeline construction helper lowerEsimdConstructs is also copied from sycl-post-link.

@jopperm jopperm requested a review from cperkinsintel December 2, 2024 11:06
@jopperm jopperm self-assigned this Dec 2, 2024
@jopperm jopperm requested review from a team as code owners December 2, 2024 11:06
Copy link
Contributor

@sommerlukas sommerlukas left a comment

Choose a reason for hiding this comment

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

Just a few nits & questions.

MDesc = std::move(ESIMDSplits.front());

if (MDesc.isESIMD()) {
// TODO: We're assuming ESIMD lowering is not deactivated (why would it?).
Copy link
Contributor

Choose a reason for hiding this comment

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

How would it be deactivated? Through a user option?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The driver would deactivate it (i.e. not pass -lower-esimd to sycl-post-link) in the IR-only output mode, which is only relevant for spec constant processing IIUC. Otherwise it doesn't seem to be influenced by a user-option. I updated the comment to reflect this.

FunctionPassManager MainFPM;
MainFPM.addPass(ESIMDLowerLoadStorePass{});

if (!PerformOpts) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is the negation correct here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch, thanks!

namespace jit_compiler {

// Runs a pass pipeline to lower ESIMD constructs on the given split model,
// which may only contain ESIMD entrypoints. This is a copy of the similar
Copy link
Contributor

Choose a reason for hiding this comment

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

may or must?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

must

Signed-off-by: Julian Oppermann <[email protected]>
@jopperm
Copy link
Contributor Author

jopperm commented Dec 3, 2024

@intel/llvm-gatekeepers Please merge, thanks.

@sommerlukas sommerlukas merged commit 8a17167 into intel:sycl Dec 4, 2024
14 checks passed
@jopperm jopperm deleted the rtc-esimd-only branch December 4, 2024 10:28
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