Skip to content

Conversation

RossBrunton
Copy link
Contributor

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.

@RossBrunton RossBrunton requested a review from a team as a code owner April 7, 2025 15:31
@CLAassistant
Copy link

CLAassistant commented Apr 7, 2025

CLA assistant check
All committers have signed the CLA.

@bader bader requested a review from a team April 8, 2025 21:00
Copy link
Member

@keryell keryell left a 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?

@RossBrunton
Copy link
Contributor Author

RossBrunton commented Apr 14, 2025

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? opencl_interop/opencl_interop_constructors.cpp isn't calling make_kernel on those lines.

A quick skim of line 207 of interop_constructors suggests that it should be fine as clKernel is created from ctsContext.

@keryell
Copy link
Member

keryell commented Apr 16, 2025

What file are you looking at with those line numbers?

Curious. I cannot find again what I was looking at. 🤔

@RossBrunton
Copy link
Contributor Author

@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.

Copy link
Member

@keryell keryell left a 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.
@RossBrunton
Copy link
Contributor Author

@bader I don't have merge permissions, could you merge this please?

@keryell
Copy link
Member

keryell commented Apr 26, 2025

@RossBrunton I could merge it, but, if there is no emergency, I prefer @bader to do it as the code owner.

@bader bader merged commit 1f55d2a into KhronosGroup:main May 1, 2025
9 checks passed
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