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

[SYCL][Graph] command_graph queue constructor #349

Closed
wants to merge 1 commit into from
Closed

Conversation

EwanC
Copy link
Collaborator

@EwanC EwanC commented Jan 5, 2024

Feedback from @JackAKirk that SYCL classes with a sycl::context and sycl::device constructor normally have a matching constructor taking a sycl::queue which replaces the context and device.

Being able to use a queue constructor makes it easier to port code from CUDA/HIP where there is not a concept analogous to SYCL contexts.

Our tests/examples also commonly use the pattern

queue Queue;
command_graph Graph {Queue.get_context(), Queue.get_device()}

So being able to use a queue constructor is also a more concise way to call the constructor in a lot of cases, regardless of platform.

@EwanC EwanC added Graph Specification Extension Specification related Graph Implementation Related to DPC++ implementation and testing labels Jan 5, 2024
@EwanC EwanC marked this pull request as ready for review January 8, 2024 09:30
Copy link
Collaborator

@julianmi julianmi left a comment

Choose a reason for hiding this comment

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

LGTM

Feedback from Jack Kirk (@JackAKirk) that SYCL classes with a sycl::context
and sycl::device constructor normally have a matching constructor
taking a sycl::queue which replaces the context and device.

Being able to use a queue constructor makes it easier to port code from
CUDA/HIP where there is not a concept analogous to SYCL contexts.

Our tests/examples also commonly use the pattern
```cpp
queue Queue;
command_graph Graph {Queue.get_context(), Queue.get_device()}
```

So being able to use a queue constructor is also a more concise way
to call the constructor in a lot of cases, regardless of platform.
@EwanC
Copy link
Collaborator Author

EwanC commented Jan 9, 2024

Moved to an upstream PR intel#12330

@EwanC EwanC closed this Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Graph Implementation Related to DPC++ implementation and testing Graph Specification Extension Specification related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants