-
Notifications
You must be signed in to change notification settings - Fork 89
OpenCL Interop: Use matching context when constructing queue #1075
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
Conversation
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.
Would it be the same on line 95, 116, 199, 226, 345 like
sycl::make_kernel<sycl::backend::opencl>(clKernel, ctsContext);
or is it compatible?
What file are you looking at with those line numbers? A quick skim of line 207 of |
Curious. I cannot find again what I was looking at. 🤔 |
@keryell So are there any issues with this change? If we discover issues in another file then we can always fix them as another PR. |
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.
Thanks for the bug fix!
`make_queue` accepts both a native handle and a context. While the spec doesn't explictly say so, it's my understanding that the "internal" native handle of the provided context must match the context of the provided handle. This fixes the `opencl_interop_constructors` test, which was incorrectly trying to construct a sycl::queue from a native handle created from a different context.
739e3a7
to
6b0b049
Compare
@bader I don't have merge permissions, could you merge this please? |
@RossBrunton I could merge it, but, if there is no emergency, I prefer @bader to do it as the code owner. |
make_queue
accepts both a native handle and a context. While the specdoesn't explictly say so, it's my understanding that the "internal"
native handle of the provided context must match the context of the
provided handle.
This fixes the
opencl_interop_constructors
test, which was incorrectlytrying to construct a sycl::queue from a native handle created from a
different context.