Skip to content

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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.

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

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