-
Notifications
You must be signed in to change notification settings - Fork 768
[SYCL][Docs] Update sycl_ext_intel_usm_address_spaces and fix ctors #7680
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] Update sycl_ext_intel_usm_address_spaces and fix ctors #7680
Conversation
This commit updates the sycl_ext_intel_usm_address_spaces extension to adhere to SYCL 2020 multi_ptr and updates the extension specification to use the new extension template. The extension is moved from draft to experimental. Additionally this commit fixes the multi_ptr constructors for the extension address spaces. Signed-off-by: Larsen, Steffen <[email protected]>
@GarveyJoe & @gmlueck - The new extension template does not have the notion of a draft extension, so this moves sycl_ext_intel_usm_address_spaces to experimental. Any objections? |
/verify with intel/llvm-test-suite#1439 |
The previous extension was "supported" not "draft". I don't mind making it "experimental", but I was under the impression that the FPGA team needed this to be "supported". Do the changes in this PR break compatibility with existing code? |
It was under the supported folder, but the extension specification stated that the extension itself was in draft state, with roughly the same disclaimers as we use for experimental.
It should not. It just ensures it works correctly for non-legacy |
sycl/doc/extensions/experimental/sycl_ext_intel_usm_address_spaces.asciidoc
Outdated
Show resolved
Hide resolved
sycl/doc/extensions/experimental/sycl_ext_intel_usm_address_spaces.asciidoc
Outdated
Show resolved
Hide resolved
|
||
template<typename ElementType, access::decorated IsDecorated = access::decorated::legacy> | ||
using host_ptr = multi_ptr<ElementType, access::address_space::ext_intel_global_host_space, IsDecorated> | ||
``` |
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.
Clarify which namespace these are in. I think they are currently in sycl
, but that's not the right place. They should either be in sycl::ext::intel
or sycl::ext::intel::experimental
, depending on the status of this extension.
I think we should deprecate the existing aliases and add new ones in the correct namespace.
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.
Currently it is in the sycl
namespace, but I agree they should be moved. Should we also add raw_
and decorated_
variants while we are in here? @GarveyJoe - Are you okay if we just move them or would you prefer we keep the old ones in the sycl
namespace as deprecated for now?
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.
Please keep the old ones working with deprecation warnings for now so that we can migrate gradually. FYI, @ajaykumarkannan
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 have added a deprecation warning to the sycl::{device|host}_ptr
aliases, but it seems that clang isn't handling deprecations of templated aliases correctly at the moment, so users won't be told until that is fixed.
The new pointer aliases are:
sycl::ext::intel::device_ptr
sycl::ext::intel::raw_device_ptr
sycl::ext::intel::decorated_device_ptr
sycl::ext::intel::host_ptr
sycl::ext::intel::raw_host_ptr
sycl::ext::intel::decorated_host_ptr
following the same definitions as other pointer aliases with similar naming in SYCL 2020.
@@ -356,6 +356,17 @@ template <typename ToT, typename FromT> inline ToT cast_AS(FromT from) { | |||
return reinterpret_cast<ToT>(from); | |||
#endif // defined(__NVPTX__) || defined(__AMDGCN__) | |||
} else | |||
#ifdef __ENABLE_USM_ADDR_SPACE__ |
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.
Is this extension is only enabled if the user defines this macro? That isn't consistent with other extensions and it isn't documented in the extension specification.
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.
My understanding is that if this isn't defined it will just use the same address space qualifier as for global_space
, so the extension is still supported but does not have much of an effect.
The language evolution team discussed this in the past and decided that the "Draft" notice in the extension specifications was not a reliable indication that the extension was unsupported. This is left over from before we had an official extension spec template, and virtually all of the old extensions said they were "Draft". BTW, thanks for taking the time to migrate this spec to the new template. We have a number of old specifications that should be migrated, and it's good to chip away at the backlog. |
Signed-off-by: Larsen, Steffen <[email protected]>
I second Greg's comments about the "draft" not being reliable. This extension is fully supported and being used by customers today. Can we keep the new version under "supported" and make sure that any functional changes are staged to cause minimal migration pain? |
Signed-off-by: Larsen, Steffen <[email protected]>
Signed-off-by: Larsen, Steffen <[email protected]>
Thank you, @GarveyJoe! It has been moved back to supported and as such I have incremented the feature-test macro to indicate the change. |
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.
The extension is moved from draft to experimental.
You probably want to edit your first PR comment to remove this sentence, so it doesn't appear in the final squashed commit message.
sycl/doc/extensions/supported/sycl_ext_intel_usm_address_spaces.asciidoc
Outdated
Show resolved
Hide resolved
Signed-off-by: Larsen, Steffen <[email protected]>
I have changed the description of the PR which should be what we normally reflect in the merge commit. Changing the description of the first PR would require a force-push which we generally try to avoid as it makes github trip for reviewers. |
Yes, that's what I mean. Your term "description of the PR" is what I meant by "first PR comment". |
@GarveyJoe - Are you happy with the changes? |
intel#7680 deprecated device_ptr and host_ptr under the sycl namespace and intended to add them under the sycl::ext::intel namespace instead, but did not. This commit adds them to the namespace as originally intended. They are already implemented in the extension headers. Signed-off-by: Larsen, Steffen <[email protected]>
#7680 deprecated device_ptr and host_ptr under the sycl namespace and intended to add them under the sycl::ext::intel namespace instead, but did not. This commit adds them to the namespace as originally intended. They are already implemented in the extension headers. Signed-off-by: Larsen, Steffen <[email protected]>
They have been deprecated in intel#7680 more than a year ago.
They have been deprecated in #7680 more than a year ago. --------- Co-authored-by: Greg Lueck <[email protected]>
This commit updates the sycl_ext_intel_usm_address_spaces extension to adhere to SYCL 2020
multi_ptr
and updates the extension specification to use the new extension template.Additionally this commit fixes the
multi_ptr
constructors for the extension address spaces.