Skip to content

[SYCL][Fusion] Scheduler support for kernel fusion #7531

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 3 commits into from
Dec 16, 2022

Conversation

sommerlukas
Copy link
Contributor

This is the third patch in a series of patches to add an implementation of the kernel fusion extension. We have split the implementation into multiple patches to make them more easy to review. This patch integrates the kernel fusion extension into the SYCL runtime scheduler.

Next to collecting the kernels submitted while in fusion mode in the fusion list associated with the queue, the integration into the scheduler is also responsible for detecting the synchronization scenarios. Various scenarios, such as buffer destruction or event wait, require fusion to be aborted early. The full list of scenarios is available in the extension proposal.

A high-level description of the integration into the scheduler can be found in the design document.

This PR can be reviewed and merged independently of #7465.

Signed-off-by: Lukas Sommer [email protected]

@sommerlukas
Copy link
Contributor Author

Tests for this PR are in intel/llvm-test-suite#1416

@sommerlukas sommerlukas self-assigned this Nov 28, 2022
@dm-vodopyanov
Copy link
Contributor

/verify with intel/llvm-test-suite#1416

Copy link
Contributor

@steffenlarsen steffenlarsen left a comment

Choose a reason for hiding this comment

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

Generally looks good, but since it touches the graph-builder and scheduler I would like @sergey-semenov's eyes on it too.

@bader
Copy link
Contributor

bader commented Dec 7, 2022

Generally looks good, but since it touches the graph-builder and scheduler I would like @sergey-semenov's eyes on it too.

@sergey-semenov, ping.

@sommerlukas sommerlukas force-pushed the kernel-fusion/third-patch branch 2 times, most recently from 4c5095e to e271e60 Compare December 9, 2022 15:56
Copy link
Contributor

@sergey-semenov sergey-semenov left a comment

Choose a reason for hiding this comment

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

Sorry about the late review. Could you add some unit tests to cover the new functionality?

@sommerlukas sommerlukas force-pushed the kernel-fusion/third-patch branch from 1e63bdb to 793b19b Compare December 12, 2022 15:34
@sommerlukas
Copy link
Contributor Author

@sergey-semenov Thank you very much for your review and feedback! I've addressed it in the latest commit.

Could you add some unit tests to cover the new functionality?

I have now added a unit-test (as part of the SchedulerTests), testing correct dependency setup for kernel fusion.

The scheduler integration is also tested by a number of application tests in intel/llvm-test-suite#1416.

Copy link
Contributor

@sergey-semenov sergey-semenov left a comment

Choose a reason for hiding this comment

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

LGTM

@pvchupin
Copy link
Contributor

@sommerlukas, please fix conflicts

@sommerlukas sommerlukas force-pushed the kernel-fusion/third-patch branch from e0430cd to 5bdbb12 Compare December 16, 2022 08:27
@sommerlukas
Copy link
Contributor Author

sommerlukas commented Dec 16, 2022

@sommerlukas, please fix conflicts

Sorry for the delay, I needed to wait for #7794 and #7798 to be merged, because without those, tests were failing locally for me.

The rebase is done now. @pvchupin, @steffenlarsen or @intel/llvm-gatekeepers can you please merge this now?

dm-vodopyanov pushed a commit to intel/llvm-test-suite that referenced this pull request Jan 23, 2023
Test integration of kernel fusion into the SYCL runtime scheduler.
    
Check that cancellation of the fusion happens if required by synchronization rules, as described in the [extension proposal](https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/experimental/sycl_ext_codeplay_kernel_fusion.asciidoc#synchronization-in-the-sycl-application).

Spec: intel/llvm#7098
Implementation: intel/llvm#7531

Signed-off-by: Lukas Sommer <[email protected]>
aelovikov-intel pushed a commit to aelovikov-intel/llvm that referenced this pull request Feb 23, 2023
Test integration of kernel fusion into the SYCL runtime scheduler.
    
Check that cancellation of the fusion happens if required by synchronization rules, as described in the [extension proposal](https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/experimental/sycl_ext_codeplay_kernel_fusion.asciidoc#synchronization-in-the-sycl-application).

Spec: intel#7098
Implementation: intel#7531

Signed-off-by: Lukas Sommer <[email protected]>
aelovikov-intel pushed a commit to aelovikov-intel/llvm that referenced this pull request Mar 27, 2023
…te#1416)

Test integration of kernel fusion into the SYCL runtime scheduler.
    
Check that cancellation of the fusion happens if required by synchronization rules, as described in the [extension proposal](https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/experimental/sycl_ext_codeplay_kernel_fusion.asciidoc#synchronization-in-the-sycl-application).

Spec: intel#7098
Implementation: intel#7531

Signed-off-by: Lukas Sommer <[email protected]>
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.

7 participants