-
Notifications
You must be signed in to change notification settings - Fork 739
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
[SYCL][Docs] Add legacy SYCL 1.2.1 image aspect #9217
[SYCL][Docs] Add legacy SYCL 1.2.1 image aspect #9217
Conversation
Since SYCL 2020 no longer has the SYCL 1.2.1 images, neither the `device::info::image_support` query nor `aspect::image` query guarantees that a given device support the SYCL 1.2.1 images. To alleviate this, this commit adds an extension with a new aspect `ext_intel_legacy_image` intended for querying support for SYCL 1.2.1 images. To help users correctly transition to using this new aspect, a warning is issued when the user calls either `platform::has` or `device::has` with `aspect::image`, warning the user that SYCL 2020 images are not supported and suggesting they use the new aspect instead. In a future update, these calls will be changed to return false due to missing SYCL 2020 image support. Signed-off-by: Larsen, Steffen <steffen.larsen@intel.com>
Tag @intel/sycl-language-enabling-triage for awareness. |
|=== | ||
|
||
|
||
=== More sections at your discretion |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need a better title for this section.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops. It has been changed!
#if !defined(SYCL_DISABLE_IMAGE_ASPECT_WARNING) && __has_attribute(diagnose_if) | ||
#define __SYCL_WARN_IMAGE_ASPECT(aspect_param) \ | ||
__attribute__((diagnose_if( \ | ||
aspect_param == aspect::image, \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens here if the value of aspect_param
is not known at compile time?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sadly it would not produce the warning. For example a call like
sycl::aspect A = sycl::aspect::image;
Dev.has(A);
would not produce the warning. However, the expectation is that using the aspect directly is the most common pattern and as such should catch the majority of cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that's OK. I was worried that the compiler might diagnose an error if the expression aspect_param == aspect::image
cannot be evaluated at compile time.
Signed-off-by: Larsen, Steffen <steffen.larsen@intel.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extension spec LGTM.
Signed-off-by: Larsen, Steffen <steffen.larsen@intel.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@intel/dpcpp-esimd-reviewers - In the original pass over the affected tests I missed the ESIMD-related ones. This has been amended in the newest merge with SYCL, but it should all just be requiring the new legacy image aspect instead of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doc
changes LGTM
As mentioned in the CTS pull request KhronosGroup/SYCL-CTS#870, two device info descriptors, namely `info::device::image_max_array_size` and `info::device::opencl_c_version`, have been deprecated and no longer exist in the SYCL 2020 specification. But they still exist in our implementation, so I'm setting up deprecation warnings for them. Also a related test case has been revised to remove the usage of `info::device::opencl_c_version`. Also `info::device::usm_system_allocator` has been replaced and marked as deprecated 2+ years ago in PR #4007 and #9217 respectively. So I'm cleaning up a few relevant code pieces in our code as well in this PR. --------- Signed-off-by: Hu, Peisen <peisen.hu@intel.com>
Since SYCL 2020 no longer has the SYCL 1.2.1 images, neither the
device::info::image_support
query noraspect::image
query guarantees that a given device support the SYCL 1.2.1 images. To alleviate this, this commit adds an extension with a new aspectext_intel_legacy_image
intended for querying support for SYCL 1.2.1 images.To help users correctly transition to using this new aspect, a warning is issued when the user calls either
platform::has
ordevice::has
withaspect::image
, warning the user that SYCL 2020 images are not supported and suggesting they use the new aspect instead. In a future update, these calls will be changed to return false due to missing SYCL 2020 image support.