Skip to content

[SYCL] Add the notion of default contexts. #2805

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 52 commits into from
Sep 10, 2021

Conversation

jbrodman
Copy link
Contributor

@jbrodman jbrodman commented Nov 20, 2020

A default context is now defined per platform. The default context initially contains all devices in the platform.
Queue creation will use the device's platform's default context instead of creating a new context with that device.

The new extension introduces ext_oneapi_get_default_context() member function to the platform class.

DPC++ runtime allows control of this feature with SYCL_ENABLE_DEFAULT_CONTEXTS env variable. It is enabled by default on Linux and disabled on Windows.

…l use the platform's default context instead of creating a new context for the specified device.

Signed-off-by: James Brodman <james.brodman@intel.com>
Signed-off-by: James Brodman <james.brodman@intel.com>
Signed-off-by: James Brodman <james.brodman@intel.com>
Signed-off-by: James Brodman <james.brodman@intel.com>
Signed-off-by: James Brodman <james.brodman@intel.com>
… code path

Signed-off-by: James Brodman <james.brodman@intel.com>
…d result in no default context

Signed-off-by: James Brodman <james.brodman@intel.com>
@jbrodman jbrodman requested a review from a team as a code owner November 20, 2020 18:44
Signed-off-by: James Brodman <james.brodman@intel.com>
Signed-off-by: James Brodman <james.brodman@intel.com>
alexbatashev
alexbatashev previously approved these changes Jan 24, 2021
Copy link
Contributor

@alexbatashev alexbatashev left a comment

Choose a reason for hiding this comment

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

LGTM

@romanovvlad
Copy link
Contributor

@jbrodman Could you please point to the extension document?

Signed-off-by: James Brodman <james.brodman@intel.com>
Signed-off-by: James Brodman <james.brodman@intel.com>
Signed-off-by: James Brodman <james.brodman@intel.com>
Signed-off-by: James Brodman <james.brodman@intel.com>
Signed-off-by: James Brodman <james.brodman@intel.com>
@jbrodman jbrodman requested a review from a team as a code owner March 17, 2021 20:21
jbrodman added 2 commits May 18, 2021 11:10
Signed-off-by: James Brodman <james.brodman@intel.com>
Signed-off-by: James Brodman <james.brodman@intel.com>
@alexbatashev
Copy link
Contributor

Tests should be fixed after intel/llvm-test-suite#433

@alexbatashev
Copy link
Contributor

alexbatashev commented Sep 8, 2021

SYCL :: Plugin/level_zero_dynamic_batch_test.cpp is failing. It is known to be flaky, not affected by this changeset.
There's a request to disable that test: intel/llvm-test-suite#453

bader
bader previously approved these changes Sep 8, 2021
s-kanaev
s-kanaev previously approved these changes Sep 8, 2021
Copy link
Contributor

@s-kanaev s-kanaev left a comment

Choose a reason for hiding this comment

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

LGTM

Co-authored-by: Alexey Bader <alexey.bader@intel.com>
@alexbatashev alexbatashev dismissed stale reviews from s-kanaev and bader via 08c72e7 September 8, 2021 10:13
Copy link
Contributor

@s-kanaev s-kanaev left a comment

Choose a reason for hiding this comment

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

LGTM

@alexbatashev
Copy link
Contributor

@bader @romanovvlad do you know what's wrong with cuda build? It's been stuck for over a day, but I don't see a huge queue of other PRs.

@bader
Copy link
Contributor

bader commented Sep 9, 2021

do you know what's wrong with cuda build?

No.

@alexbatashev
Copy link
Contributor

The job status is still not updated. I reported this to tooling team. The difference between last commit and the previous one is just one comment, and the previous commit has this job passed. Can we assume that tests pass?

@romanovvlad romanovvlad merged commit 315593d into intel:sycl Sep 10, 2021
@bader
Copy link
Contributor

bader commented Sep 10, 2021

@romanovvlad, @alexbatashev, unittests do not pass on GitHub machines.
https://github.com/intel/llvm/runs/3564775299
Please, fix ASAP.

DoyleLi pushed a commit to DoyleLi/intel_llvm that referenced this pull request Sep 13, 2021
A default context is now defined per platform. The default
context initially contains all devices in the platform. Queue
creation will use the device's platform's default context
instead of creating a new context with that device.

The new extension introduces ext_oneapi_get_default_context()
member function to the platform class.

DPC++ runtime allows control of this feature with
SYCL_ENABLE_DEFAULT_CONTEXTS env variable. It is enabled
by default on Linux and disabled on Windows.
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.

7 participants