Skip to content

Enable use of default platform context extension #627

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 3 commits into from
Oct 12, 2021

Conversation

oleksandr-pavlyk
Copy link
Contributor

If compiler supports default platform context extension, use that when building the cached.

@coveralls
Copy link
Collaborator

coveralls commented Oct 12, 2021

Coverage Status

Coverage increased (+0.007%) to 74.426% when pulling e68bd14 on use-default-platform-context-if-available into 2907977 on master.

Instead of using sycl::context(const sycl::device &D) constructor
to created cached context, use sycl::queue(const sycl::device &D) and
extract context from the queue.

For capable compiler, i.e. the one that supports
https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/PlatformContext/PlatformContext.adoc

the queue constructor will use platform default context. For other compilers
the sycl::context(D) will get called, so the behavior won't change.

If compiler supports default platform context extension, use that when building the cached.
@oleksandr-pavlyk oleksandr-pavlyk force-pushed the use-default-platform-context-if-available branch from fd9924b to b2bfe54 Compare October 12, 2021 17:20
Copy link
Contributor

@diptorupd diptorupd left a comment

Choose a reason for hiding this comment

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

👍

@oleksandr-pavlyk oleksandr-pavlyk merged commit eff167b into master Oct 12, 2021
@oleksandr-pavlyk oleksandr-pavlyk deleted the use-default-platform-context-if-available branch October 12, 2021 18:58
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.

3 participants