Skip to content

[SYCL] Fix DeviceCodeSplit checks to eliminate KernelInfo usage #9316

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

Conversation

KseniyaTikhomirova
Copy link
Contributor

@KseniyaTikhomirova KseniyaTikhomirova commented May 5, 2023

SYCL implementation does not properly support KernelInfo usage in multiple translation units. In this test integration header with File1Kern1 is included to main source file where we execute that kernel. In the second file get_kernel_id is used for checks but integration header is not attached to that file since we do not execute kernel there and we got UB because trying to use get_name() function of KI. This problem is a known one. This test doesn't target to verify this behavior - it is targeted to verify that kernels from different files is added to different device images if we built it with related option. A different check is implemented that do not involve UB case and enable initially disabled checks because of the problem above.

…sage in multiple translation units)

Signed-off-by: Tikhomirova, Kseniya <[email protected]>
@KseniyaTikhomirova KseniyaTikhomirova requested a review from a team as a code owner May 5, 2023 14:01
Copy link
Contributor

@aelovikov-intel aelovikov-intel left a comment

Choose a reason for hiding this comment

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

to eliminate KernelInfo usage

Why do we want to do that?

Q.submit([&](sycl::handler &Cgh) {
auto Acc = Buf.get_access<sycl::access::mode::read_write>(Cgh);
Cgh.single_task<File1Kern1>(/*Krn,*/ [=]() { Acc[0] = 1; });
Cgh.single_task<File1Kern1>(Krn1, [=]() { Acc[0] = 1; });
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this the most important part of the change?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, main change is get_kernel_ids usage

@KseniyaTikhomirova KseniyaTikhomirova temporarily deployed to aws May 5, 2023 16:06 — with GitHub Actions Inactive
@KseniyaTikhomirova
Copy link
Contributor Author

to eliminate KernelInfo usage

Why do we want to do that?

SYCL implementation does not properly support KernelInfo usage in multiple translation units. In this test integration header with File1Kern1 is included to main source file where we execute that kernel. In the second file get_kernel_id is used for checks but integration header is not attached to that file since we do not execute kernel there and we got UB because trying to use get_name() function of KI. This problem is a known one. This test doesn;t target to verify this behavior - it is targeted to verify that kernels from different files is added to different device images if we built it with related option. I implemented a different check that do not involve UB case and moreover - enable initially disabled checks because of the problem above. Please reach me out in private if you need more details about issue with KernelInfo usage.

@KseniyaTikhomirova KseniyaTikhomirova temporarily deployed to aws May 6, 2023 00:24 — with GitHub Actions Inactive
@aelovikov-intel aelovikov-intel merged commit 25211c4 into intel:sycl May 8, 2023
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.

2 participants