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 examples for SYCL Spark #16

Merged
merged 8 commits into from
May 4, 2022
Merged

Conversation

jasonsewall-intel
Copy link
Contributor

We should consider this a draft, since I'd like your comments. It's useful to have this out here to enable discussion.

Most noteworthy is that the histogram example doesn't compile with the current intel/llvm SYCL implementation because we do not support array reductions (but see intel/llvm#5941)

src/sycl/histogram.cpp Outdated Show resolved Hide resolved
@Pennycook
Copy link
Contributor

With the change from #16 (comment), the code compiles using the functionality from intel/llvm@863383b.

It doesn't pass the correctness test, but I think that's because nothing here resets the histogram. The test expects histogram[8] == N, but the behavior I see is that histogram[8] == N * iteration. Adding property::reduction::initialize_to_identity{} fixes it, but I don't understand why this is necessary -- some of the other benchmarks have this, but not all of them.

@tomdeakin, could you please take a look? What do you think the correct fix is, here?

@tomdeakin
Copy link
Contributor

tomdeakin commented May 3, 2022

@Pennycook All the original benchmarks set property::reduction::initialize_to_identity{} so if it's missing it's likely an oversight in the new benchmarks. That being said, it's up the benchmark to decide how it tests correctness, so if we want to preserve the initial value on each invocation, that's OK too - it just needs a comment in the header.

src/sycl/histogram.cpp Outdated Show resolved Hide resolved
@Pennycook
Copy link
Contributor

Thanks, @tomdeakin. I don't think I have permissions to modify Jason's branch, and I think he's lost access to his "-intel" GitHub account.... So, I've just added a suggested change to the line that I think needs to be updated.

Do you have permissions to accept the suggested changes?

Co-authored-by: John Pennycook <john.pennycook@intel.com>
src/sycl/histogram.cpp Outdated Show resolved Hide resolved
src/sycl/histogram.cpp Outdated Show resolved Hide resolved
@tomdeakin
Copy link
Contributor

@Pennycook - think I have those changes in now.

We might want to merge this and #17 into a spark branch in the short term as both these PRs will likely break compiling the other models which don't implement these kernels (yet).

@jasonsewall-intel
Copy link
Contributor Author

I still have access! I changed the email address before I left. But this looks good and I thank you for making the changes.

@tomdeakin tomdeakin changed the base branch from main to spark May 4, 2022 18:07
@tomdeakin
Copy link
Contributor

All good to merge into a spark branch? I can then merge #17 into the same branch; Im predicting minor conflicts in the driver code but should be simple to fix.

@Pennycook
Copy link
Contributor

All good to merge into a spark branch? I can then merge #17 into the same branch; Im predicting minor conflicts in the driver code but should be simple to fix.

Sounds good to me. Thanks again for doing this. And sorry, @jasonsewall-intel -- I don't know why I thought you'd lost access!

@tomdeakin tomdeakin merged commit e5df6b9 into UoB-HPC:spark May 4, 2022
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.

3 participants