Skip to content

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.

Signed-off-by: Julian Oppermann <julian.oppermann@codeplay.com>
@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
Signed-off-by: Julian Oppermann <julian.oppermann@codeplay.com>
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 <julian.oppermann@codeplay.com>
@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