Skip to content
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

Add SYCL kernels #441

Open
wants to merge 27 commits into
base: develop
Choose a base branch
from
Open

Add SYCL kernels #441

wants to merge 27 commits into from

Conversation

rhornung67
Copy link
Member

@rhornung67 rhornung67 commented May 3, 2024

Add SYCL kernel variants

This PR adds SYCL variants of many kernels. There are a few issues still to be worked out in subsequent PRs.

Resolves #433

@rhornung67 rhornung67 requested review from artv3 and homerdin May 3, 2024 22:33
@rhornung67 rhornung67 changed the title Rajaperf polybench [NO NOT MERGE YET!] Kernels that use RAJA::kernel and SYCL May 31, 2024
@rhornung67 rhornung67 requested a review from MrBurmark May 31, 2024 22:19
@LLNL LLNL deleted a comment from artv3 May 31, 2024
@rhornung67
Copy link
Member Author

@artv3 @MrBurmark @homerdin this should be good to go. I'll be making more modifications in subsequent PRs.

@rhornung67 rhornung67 changed the title Kernels that use RAJA::kernel and SYCL Add SYCL kernels Jun 5, 2024
[=] (sycl::nd_item<1> item ) {

Index_type i = item.get_global_id(0);
if (i > 0 && i < iend) {
Copy link
Member

Choose a reason for hiding this comment

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

do all of the variants have both checks?

}
POLYBENCH_2MM_BODY3;

sycl::range<3> global_dim1(1,
Copy link
Member

Choose a reason for hiding this comment

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

Don't we only need a 2d range?

Copy link
Member

Choose a reason for hiding this comment

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

the RAJA backend uses a 3D range

});

qu->submit([&] (sycl::handler& h) {
h.parallel_for(sycl::nd_range<3>( global_dim2, wkgroup_dim),
Copy link
Member

Choose a reason for hiding this comment

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

global_dim3?

using EXEC_POL =
RAJA::KernelPolicy<
RAJA::statement::SyclKernelAsync<
RAJA::statement::For<0, RAJA::sycl_global_0<work_group_size>,
Copy link
Member

Choose a reason for hiding this comment

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

In kernel do we always use a 3d grid, if so should we use sycl_global_2 here?

Copy link
Member

Choose a reason for hiding this comment

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

Maybe we could set the sycl indexing dimension as an argument to SyclKernelAsync.

Copy link
Member

@artv3 artv3 left a comment

Choose a reason for hiding this comment

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

Looks good overall

}
POLYBENCH_2MM_BODY3;

sycl::range<3> global_dim1(1,
Copy link
Member

Choose a reason for hiding this comment

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

the RAJA backend uses a 3D range

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.

Fill in missing SYCL variants of "polybench" kernels
3 participants