Skip to content

Implement SyclEvent#203

Merged
MrBurmark merged 6 commits into
mainfrom
feature/burmark1/sycl_event_impl
May 28, 2026
Merged

Implement SyclEvent#203
MrBurmark merged 6 commits into
mainfrom
feature/burmark1/sycl_event_impl

Conversation

@MrBurmark
Copy link
Copy Markdown
Member

@MrBurmark MrBurmark commented May 26, 2026

Add an implementation for SyclEvent.

This gets an event from the queue by calling submit but not actually submitting any work. Hopefully this gets an event without causing any significant overheads and is well defined behavior.

Note that this will not work for out of order queues. So now the SyclEvent constructor throws an exception if you try to create an event from an out of order queue. We only make in order queues due to our semantic guarantees, but someone could make a Sycl resource via SyclFromQueue from an out of order queue.

Depends on #182 .

@MrBurmark MrBurmark requested a review from trws May 26, 2026 23:35
@MrBurmark
Copy link
Copy Markdown
Member Author

@trws does this seem like a reasonable way to implement SyclEvent?

@MrBurmark MrBurmark force-pushed the feature/burmark1/sycl_event_impl branch 2 times, most recently from a7ef020 to dac34c4 Compare May 27, 2026 14:40
@MrBurmark MrBurmark force-pushed the feature/burmark1/sycl_event_impl branch from dac34c4 to 7875d1c Compare May 27, 2026 16:11
@MrBurmark MrBurmark marked this pull request as ready for review May 27, 2026 16:12
@MrBurmark MrBurmark force-pushed the feature/burmark1/sycl_event_impl branch from 7875d1c to df1d03f Compare May 27, 2026 16:14
adayton1
adayton1 previously approved these changes May 27, 2026
This uses an empty submit to get an event as there is
no way to get an event from a queue without doing some
kind of work, hopefully this gives a real useful event.

Also add an explicit constructor from a sycl::event to allow
the possibility of wrapping an event created outside of SyclEvent.
@MrBurmark MrBurmark force-pushed the feature/burmark1/sycl_event_impl branch from df1d03f to 61b6325 Compare May 27, 2026 16:16
adayton1
adayton1 previously approved these changes May 27, 2026
Comment thread include/camp/resource/sycl.hpp
rhornung67
rhornung67 previously approved these changes May 27, 2026
Comment thread include/camp/resource/sycl.hpp Outdated
Make a copy of event to work around needing a non-const event.
@MrBurmark MrBurmark dismissed stale reviews from rhornung67 and adayton1 via 640fc7f May 27, 2026 17:04
adayton1
adayton1 previously approved these changes May 27, 2026
@MrBurmark MrBurmark force-pushed the feature/burmark1/sycl_event_impl branch 2 times, most recently from d96a36c to ee9b1e8 Compare May 27, 2026 17:34
@MrBurmark MrBurmark requested a review from rhornung67 May 27, 2026 17:35
@MrBurmark MrBurmark requested a review from adayton1 May 27, 2026 17:35
Implemented via an empty submit that depends on the event.
@MrBurmark MrBurmark force-pushed the feature/burmark1/sycl_event_impl branch from ee9b1e8 to 2bea9c0 Compare May 27, 2026 17:40
adayton1
adayton1 previously approved these changes May 27, 2026
@MrBurmark MrBurmark force-pushed the feature/burmark1/sycl_event_impl branch from af9b335 to af72ed1 Compare May 27, 2026 18:20
@MrBurmark MrBurmark force-pushed the feature/burmark1/sycl_event_impl branch from af72ed1 to 525ce40 Compare May 27, 2026 18:22
@MrBurmark
Copy link
Copy Markdown
Member Author

@homerdin Does this seem like a reasonable way to implement events on top of sycl?

@homerdin
Copy link
Copy Markdown
Contributor

@MrBurmark Yes, I think this is a good way to go.

@MrBurmark MrBurmark requested a review from adayton1 May 28, 2026 14:31
Comment thread include/camp/resource/sycl.hpp Outdated
Comment thread include/camp/resource/sycl.hpp Outdated
@MrBurmark MrBurmark merged commit 2c2555f into main May 28, 2026
12 checks passed
@MrBurmark MrBurmark deleted the feature/burmark1/sycl_event_impl branch May 28, 2026 20:03
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.

4 participants