-
Notifications
You must be signed in to change notification settings - Fork 768
[SYCL][Fusion] Add kernel fusion extension API #7416
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
[SYCL][Fusion] Add kernel fusion extension API #7416
Conversation
Signed-off-by: Lukas Sommer <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please add some tests for this? I realize there isn't much functionality to it as of this part, but it would be good to at least have some tests that ensures that simple programs using them will compile.
@@ -144,6 +144,9 @@ install(DIRECTORY ${OpenCL_INCLUDE_DIR}/CL | |||
DESTINATION ${SYCL_INCLUDE_DIR}/sycl | |||
COMPONENT OpenCL-Headers) | |||
|
|||
# Option to enable online kernel fusion via a JIT compiler | |||
option(SYCL_ENABLE_KERNEL_FUSION "Enable kernel fusion via JIT compiler" OFF) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pvchupin - Do we have a good place to document this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A future PR will add support for fusion in buildbot/configure.py
, which would then set the value for this option.
Users using buildbot/configure.py
would therefore not need to set this option manually.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess it can be documented at https://github.com/intel/llvm/blob/sycl/sycl/doc/GetStartedGuide.md#build-dpc-toolchain
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In that case, I am okay with waiting with documentation for it until it has an option in buildbot/configure.py
. I'll let @pvchupin have the last say in that though.
Thank you for your feedback @steffenlarsen! I've added two simple tests compiling applications using the kernel fusion API in intel/llvm-test-suite#1404. The tests do not yet execute the compiled application, as the necessary functionality is still missing, but it checks that compilation will work with the kernel fusion API. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! As mentioned in the comment, I am okay with having the kernel_funsion_impl
class in a follow-up patch.
Signed-off-by: Lukas Sommer <[email protected]>
Signed-off-by: Lukas Sommer <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! 🚀
Thanks for the approval @steffenlarsen. Can you or @pvchupin please merge this PR, I do not have the necessary permissions to merge. |
Two simple tests to check that code using the kernel fusion extension API compiles correctly. The tests currently do not yet execute the compiled application, as the necessary functionality will only be added to the implementation in a later PR. Spec: intel/llvm#7098 Implementation: intel/llvm#7416 Signed-off-by: Lukas Sommer <[email protected]>
This is the second patch in a series of patches to add an implementation of thekernel fusion extension. We have split the implementation into multiple patches to make them more easy to review. This patch can be reviewed and merged independently of #7416. This patch adds the first components for the JIT compiler used for implementation of kernel fusion at runtime , concretely: API definitions Input translation from SPIR-V to LLVM IR Insertion of fused kernel function stub and metadata Supporting infrastructure such as compiler options. CMake logic to link and code to invoke this JIT from the SYCL runtime will follow in a later patch. Co-authored-by: Lukas Sommer [email protected] Co-authored-by: Victor Perez [email protected] Signed-off-by: Lukas Sommer [email protected]
Two simple tests to check that code using the kernel fusion extension API compiles correctly. The tests currently do not yet execute the compiled application, as the necessary functionality will only be added to the implementation in a later PR. Spec: intel#7098 Implementation: intel#7416 Signed-off-by: Lukas Sommer <[email protected]>
…ite#1404) Two simple tests to check that code using the kernel fusion extension API compiles correctly. The tests currently do not yet execute the compiled application, as the necessary functionality will only be added to the implementation in a later PR. Spec: intel#7098 Implementation: intel#7416 Signed-off-by: Lukas Sommer <[email protected]>
This is the first 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 first patch introduces the user-facing API discussed in the extension proposal. It does not yet add any fusion functionality, just the mere API and SYCL properties. Calls to the API will throw an error until the remaining functionality lands with the following patches.
The design document for the overall implementation of kernel fusion can be found here.
Signed-off-by: Lukas Sommer [email protected]