Skip to content

[SYCL][Fusion] Cache JIT compiled fused kernels #8051

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 1 commit into from
Jan 27, 2023

Conversation

sommerlukas
Copy link
Contributor

Avoid repeating the kernel fusion JIT compilation pipeline if the sequence of kernels to be fused is equivalent to a sequence of kernels fused before.

Next to the sequence of kernels, the detected parameter identities & constants as well as the user-specified internalizations play a role for the equivalence of two sequences. This is all incorporated in the cache lookup.

The JIT compilation caching (on/off) can be controlled through the configuration/environment variable SYCL_ENABLE_FUSION_CACHING, the default is on.

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

@sommerlukas sommerlukas self-assigned this Jan 19, 2023
@sommerlukas sommerlukas requested review from victor-eds, Naghasan and a team as code owners January 19, 2023 11:13
@sommerlukas sommerlukas requested a review from bso-intel January 19, 2023 11:13
@sommerlukas
Copy link
Contributor Author

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

@sommerlukas
Copy link
Contributor Author

Putting up the test for this PR is blocked by review & merge of intel/llvm-test-suite#1416.

There is draft PR here, based on another draft PR with the tests for #7831, which in turn is blocked by intel/llvm-test-suite#1416.

@sommerlukas sommerlukas force-pushed the kernel-fusion/seventh-patch branch from 6f49dc5 to f81936f Compare January 19, 2023 16:29
@sommerlukas sommerlukas temporarily deployed to aws January 19, 2023 16:55 — with GitHub Actions Inactive
@sommerlukas sommerlukas temporarily deployed to aws January 19, 2023 18:10 — with GitHub Actions Inactive
@sommerlukas sommerlukas force-pushed the kernel-fusion/seventh-patch branch from f81936f to 51f3329 Compare January 26, 2023 16:23
@sommerlukas sommerlukas requested a review from a team as a code owner January 26, 2023 16:23
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.

Changes look good to me, apart from a small nit.

@sommerlukas sommerlukas temporarily deployed to aws January 26, 2023 16:50 — with GitHub Actions Inactive
@sommerlukas sommerlukas force-pushed the kernel-fusion/seventh-patch branch from 51f3329 to 21a8981 Compare January 26, 2023 17:31
@sommerlukas sommerlukas temporarily deployed to aws January 26, 2023 18:01 — with GitHub Actions Inactive
@sommerlukas sommerlukas temporarily deployed to aws January 26, 2023 18:38 — with GitHub Actions Inactive
@sommerlukas
Copy link
Contributor Author

@intel/llvm-gatekeepers Can someone please merge, I'm not authorized.

@steffenlarsen
Copy link
Contributor

Failed Tests (1):
SYCL :: dword_atomic_smoke.cpp

Reported in #8098

@steffenlarsen steffenlarsen merged commit ab0c46b into intel:sycl Jan 27, 2023
steffenlarsen pushed a commit to intel/llvm-test-suite that referenced this pull request Feb 7, 2023
Check that JIT compilation for kernel fusion is or is not repeated, depending on whether a newly submitted sequence of kernels is equivalent to a previous sequence.

Next to the sequence of kernels, other invocation information, e.g., the user-specified internalization properties play a role to assess equivalence with a previous compilation. Different scenarios are tested by the test added in this PR. 

Implementation: intel/llvm#8051

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

Check that JIT compilation for kernel fusion is or is not repeated, depending on whether a newly submitted sequence of kernels is equivalent to a previous sequence.

Next to the sequence of kernels, other invocation information, e.g., the user-specified internalization properties play a role to assess equivalence with a previous compilation. Different scenarios are tested by the test added in this PR. 

Implementation: intel#8051

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.

3 participants