-
Notifications
You must be signed in to change notification settings - Fork 39
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
base: develop
Are you sure you want to change the base?
Add SYCL kernels #441
Conversation
"non-uniform workgroup size" issue.
Base SYCL vairant is good for each; checksum issues with RAJA_SYCL variants
Also, change SYCL exec policies to sync for correctness. This needed to be investigated to resolve.
@artv3 @MrBurmark @homerdin this should be good to go. I'll be making more modifications in subsequent PRs. |
[=] (sycl::nd_item<1> item ) { | ||
|
||
Index_type i = item.get_global_id(0); | ||
if (i > 0 && i < iend) { |
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.
do all of the variants have both checks?
} | ||
POLYBENCH_2MM_BODY3; | ||
|
||
sycl::range<3> global_dim1(1, |
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.
Don't we only need a 2d range?
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.
the RAJA backend uses a 3D range
}); | ||
|
||
qu->submit([&] (sycl::handler& h) { | ||
h.parallel_for(sycl::nd_range<3>( global_dim2, wkgroup_dim), |
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.
global_dim3?
using EXEC_POL = | ||
RAJA::KernelPolicy< | ||
RAJA::statement::SyclKernelAsync< | ||
RAJA::statement::For<0, RAJA::sycl_global_0<work_group_size>, |
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 kernel do we always use a 3d grid, if so should we use sycl_global_2
here?
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.
Maybe we could set the sycl indexing dimension as an argument to SyclKernelAsync.
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 overall
} | ||
POLYBENCH_2MM_BODY3; | ||
|
||
sycl::range<3> global_dim1(1, |
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.
the RAJA backend uses a 3D range
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