-
Notifications
You must be signed in to change notification settings - Fork 787
[SYCL] Filter implicit kernel bundle images #5285
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] Filter implicit kernel bundle images #5285
Conversation
The runtime currently uses implicit kernel bundles to allow for operations such as setting specialization constants. Since the handler does not know the kernel to launch before it is being launched, the implicit kernel bundle created is not limited to specific kernels. As an effect of this, the kernel bundle may try to build more device images than it needs. These changes make the runtime filter the device images of implicit kernel bundles as soon as the relevant kernel is known. Signed-off-by: Steffen Larsen <[email protected]>
/verify with intel/llvm-test-suite#726 |
Is there any expected impact on performance? |
If anything I would expect improved performance due to potentially fewer image builds, but there could be some rare cases where a program may have silently benefitted from building a device image early though that is a hypothetical. |
Signed-off-by: Steffen Larsen <[email protected]>
Signed-off-by: Steffen Larsen <[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.
LGTM
/verify with intel/llvm-test-suite#726 |
This commit changes the strategy from having implicitly created kernel bundles include all device images and then filter later, to have the implicitly created kernel bundles have no device images initially and then add the images once required kernels are known. Signed-off-by: Steffen Larsen <[email protected]>
Based on an offline discussion with @romanovvlad the strategy of this PR has been changed from filtering implicitly created kernel bundles with all available device images to instead create the implicitly created kernel bundles without any device images and then add them once kernels are known. @s-kanaev and @romanovvlad - Please have a look and let me know what you think. Note: The tests are expected to fail on Windows currently because of missing symbols. Once I have added the symbols I will verify with intel/llvm-test-suite#726 |
Signed-off-by: Steffen Larsen <[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.
LGTM.
Should there be any test?
Test added in intel/llvm-test-suite#726 is still applicable. |
My bad. Thanks. |
Signed-off-by: Steffen Larsen <[email protected]>
/verify with intel/llvm-test-suite#726 |
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
Thanks. |
Signed-off-by: Steffen Larsen <[email protected]>
Signed-off-by: Steffen Larsen <[email protected]>
Signed-off-by: Steffen Larsen <[email protected]>
Signed-off-by: Steffen Larsen <[email protected]>
Signed-off-by: Steffen Larsen <[email protected]>
Signed-off-by: Steffen Larsen <[email protected]>
The runtime currently uses implicit kernel bundles to allow for operations such as setting specialization constants. Since the handler does not know the kernel to launch before it is being launched, the implicit kernel bundle created is not limited to specific kernels. As an effect of this, the kernel bundle may try to build more device images than it needs.
These changes make the runtime filter the device images of implicit kernel bundles as soon as the relevant kernel is known.