Skip to content

[SYCL] Remove device::has_extension() and platform::has_extension() #4449

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

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions sycl/include/CL/sycl/device.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,13 @@ class __SYCL_EXPORT device {
typename info::param_traits<info::device, param>::return_type
Copy link
Contributor

Choose a reason for hiding this comment

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

Please, do not merge this patch.

get_info() const;

/// Check SYCL extension support by device
/// Check SYCL extension support by device. Deprecated in SYCL 2020
///
/// \param extension_name is a name of queried extension.
/// \return true if SYCL device supports the extension.
__SYCL2020_DEPRECATED("use device::has() function with aspects APIs instead")
#ifdef __SYCL_INTERNAL_API
bool has_extension(const std::string &extension_name) const;
#endif // __SYCL_INTERNAL_API

/// Query available SYCL devices
///
Expand Down
6 changes: 3 additions & 3 deletions sycl/include/CL/sycl/platform.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,13 @@ class __SYCL_EXPORT platform {
__SYCL2020_DEPRECATED("OpenCL interop APIs are deprecated")
cl_platform_id get() const;

/// Checks if platform supports specified extension.
/// Checks if platform supports specified extension. Deprecated in SYCL 2020
///
/// \param ExtensionName is a string containing extension name.
/// \return true if specified extension is supported by this SYCL platform.
__SYCL2020_DEPRECATED(
"use platform::has() function with aspects APIs instead")
#ifdef __SYCL_INTERNAL_API
bool has_extension(const std::string &ExtensionName) const;
#endif // __SYCL_INTERNAL_API

/// Checks if this SYCL platform is a host platform.
///
Expand Down
4 changes: 2 additions & 2 deletions sycl/test/warnings/sycl_2020_deprecations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ int main() {
sycl::device Device{DevId};
// expected-warning@+1 {{'get' is deprecated: OpenCL interop APIs are deprecated}}
(void)Device.get();
// expected-warning@+1 {{'has_extension' is deprecated: use device::has() function with aspects APIs instead}}
// expected-error@+1 {{no member named 'has_extension' in 'sycl::device'}}
(void)Device.has_extension("abc");

cl_event ClEvent;
Expand All @@ -42,7 +42,7 @@ int main() {
sycl::platform Platform{ClPlatform};
// expected-warning@+1 {{'get' is deprecated: OpenCL interop APIs are deprecated}}
(void)Platform.get();
// expected-warning@+1 {{'has_extension' is deprecated: use platform::has() function with aspects APIs instead}}
// expected-error@+1 {{no member named 'has_extension' in 'sycl::platform'}}
(void)Platform.has_extension("abc");

cl_command_queue ClQueue;
Expand Down