Skip to content

[SYCL] Fix get() method for non-opencl backends #3070

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

Merged
merged 6 commits into from
Jan 29, 2021

Conversation

alexanderfle
Copy link
Contributor

Before this patch, if you use non-opencl backend, then get() method returns casted wrapper of the native handle and SYCL user can’t use it in his own code. As the user can't release the returned object, it used to lead to a memory leak.

Since, get() method is applicable only for OpenCL backend, this patch adds an exception for cases when get() method is called for non-opencl backend.

Signed-off-by: Alexander Flegontov alexander.flegontov@intel.com

Signed-off-by: Alexander Flegontov <alexander.flegontov@intel.com>
@alexanderfle alexanderfle requested a review from a team as a code owner January 21, 2021 16:44
@v-klochkov
Copy link
Contributor

v-klochkov commented Jan 21, 2021

looks good to me, but one of LIT tests fails/throws exception.
@smaslov-intel would you please take a look at the changes as well?
there are no any plans to support interoperability for level-zero, right?

Signed-off-by: Alexander Flegontov <alexander.flegontov@intel.com>
@smaslov-intel
Copy link
Contributor

@smaslov-intel would you please take a look at the changes as well?

LGTM. These OpenCL-only .get() methods will be removed in SYCL2020 in favor of .get_native().

there are no any plans to support interoperability for level-zero, right?

There is no interop of Level-Zero with OpenCL. The Level-Zero interop with SYCL is through get_native() methods.

smaslov-intel
smaslov-intel previously approved these changes Jan 21, 2021
Copy link
Contributor

@smaslov-intel smaslov-intel left a comment

Choose a reason for hiding this comment

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

LGTM

Signed-off-by: Alexander Flegontov <alexander.flegontov@intel.com>
Signed-off-by: Alexander Flegontov <alexander.flegontov@intel.com>
smaslov-intel
smaslov-intel previously approved these changes Jan 23, 2021
Copy link
Contributor

@smaslov-intel smaslov-intel left a comment

Choose a reason for hiding this comment

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

LGTM

Signed-off-by: Alexander Flegontov <alexander.flegontov@intel.com>
smaslov-intel
smaslov-intel previously approved these changes Jan 26, 2021
@alexanderfle
Copy link
Contributor Author

ping @bader

@bader bader merged commit 5e7cbef into intel:sycl Jan 29, 2021
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