Skip to content

[SYCL] Remove sycl_ext_oneapi_default_context in preview-breaking mode - #22769

Open
softwaresat wants to merge 4 commits into
intel:syclfrom
softwaresat:remove-oneapi-default-context
Open

[SYCL] Remove sycl_ext_oneapi_default_context in preview-breaking mode#22769
softwaresat wants to merge 4 commits into
intel:syclfrom
softwaresat:remove-oneapi-default-context

Conversation

@softwaresat

@softwaresat softwaresat commented Jul 26, 2026

Copy link
Copy Markdown

Removes sycl_ext_oneapi_default_context in preview-breaking mode.

  • Guards platform::ext_oneapi_get_default_context() and
    SYCL_EXT_ONEAPI_DEFAULT_CONTEXT with
    __INTEL_PREVIEW_BREAKING_CHANGES.
  • Preserves platform::khr_get_default_context() and the supported
    device::ext_oneapi_get_default_context() API.
  • Updates the affected unit tests.
  • Adds a reminder to move the extension specification to removed/
    when the API is removed from normal builds.

Addresses the sycl_ext_oneapi_default_context portion of #22581.

@softwaresat
softwaresat requested review from a team as code owners July 26, 2026 05:16

@Robertkq Robertkq left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, good work!
Only note: In this repository, the body of the PR usually becomes the commit message of the Squash & Merge procedure when the PR is eventually merged, as such I think you should try to keep the body of the PR as concise as possible on the changes made and to add comments to the PR for explaining the decisions behind them

Comment thread sycl/include/sycl/platform.hpp Outdated
Comment on lines +210 to +213
/// Return this platform's default context
///
/// \return the default context
#ifndef __INTEL_PREVIEW_BREAKING_CHANGES

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

So we don't forget to remove the comment as well.

Suggested change
/// Return this platform's default context
///
/// \return the default context
#ifndef __INTEL_PREVIEW_BREAKING_CHANGES
#ifndef __INTEL_PREVIEW_BREAKING_CHANGES
/// Return this platform's default context
///
/// \return the default context

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Moved comment inside of ifndef

Comment on lines +14 to +15
This extension has been removed and is no longer supported in {dpcpp}.
Applications should use the `sycl_khr_default_context` extension instead.

@KornevNikita KornevNikita Jul 27, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Usually we use this wording for removed extensions from the template:

Suggested change
This extension has been removed and is no longer supported in {dpcpp}.
Applications should use the `sycl_khr_default_context` extension instead.
This extension is no longer implemented in DPC++. This specification is being archived only for historical purposes. The APIs defined in this specification no longer exist and cannot be used.

Although the API is still implemented actually and will be removed prior to 27.0 (8.0.0). I don't mind moving the spec to removed right now so we don't forget to move it later. @intel/dpcpp-doc-reviewers could you please comment on this?
UPD. see the comment from Greg. I've updated the issue tasks - #22581

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think it would be better to leave the specification in the "deprecated" directory until it is removed in the default case (i.e. even when -fpreview-breaking-changes is not passed).

Do you think there is a danger that we will forget to do this? Would it help us to remember if we put a comment in the Asciidoc file like:

// __INTEL_PREVIEW_BREAKING_CHANGES: Move this specification to the "removed"
// folder when the feature is removed at the next breaking changes window.

That way we will see the comment when we search for __INTEL_PREVIEW_BREAKING_CHANGES

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Updated wording and added suggested comment

@@ -1,2 +1,2 @@
This extension has been deprecated, but the specification is still available

@KornevNikita KornevNikita Jul 27, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think we just remove the extension file from supported and deprecated directories.
UPD. let's keep it for now. Probably a comment like here would be enough.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Kept extension file and added comment

@@ -0,0 +1,32 @@
// RUN: %clangxx -fsycl -fpreview-breaking-changes -fsyntax-only -Xclang -verify %s

@KornevNikita KornevNikita Jul 27, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think that might be excessive (I mean having this test). @KseniyaTikhomirova WDYT?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

agree, we don't need this. tests below are enough

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Deleted redundant test

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.

5 participants