-
Notifications
You must be signed in to change notification settings - Fork 738
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] Allow copy-construction of device_global #15075
[SYCL][Docs] Allow copy-construction of device_global #15075
Conversation
This commit makes it possible to copy-construct device_global variables if they do not have the device_image_scope property. The restriction on device_image_scope is due to static construction not being allowed in device code, which they would require, while other device_globals have USM storage which will be initialized by the host code, so the constructor on the device is a simple zero-initialization. Signed-off-by: Larsen, Steffen <[email protected]>
Signed-off-by: Larsen, Steffen <[email protected]>
sycl/doc/extensions/experimental/sycl_ext_oneapi_device_global.asciidoc
Outdated
Show resolved
Hide resolved
Signed-off-by: Larsen, Steffen <[email protected]>
Signed-off-by: Larsen, Steffen <[email protected]>
Signed-off-by: Larsen, Steffen <[email protected]>
Signed-off-by: Larsen, Steffen <[email protected]>
@steffenlarsen: I'm catching up on things, and saw this in my inbox. Are you still looking for comments? I see that the PR is "draft". |
Currently I am waiting for internal response with respect to how we should handle the case that @Pennycook |
We have agreed that the added complexity added with doing full feature parity with CUDA in the (expectedly rare) |
Signed-off-by: Larsen, Steffen <[email protected]>
Signed-off-by: Larsen, Steffen <[email protected]>
Signed-off-by: Larsen, Steffen <[email protected]>
sycl/doc/extensions/experimental/sycl_ext_oneapi_device_global.asciidoc
Outdated
Show resolved
Hide resolved
Signed-off-by: Larsen, Steffen <[email protected]>
Signed-off-by: Larsen, Steffen <[email protected]>
Signed-off-by: Larsen, Steffen <[email protected]>
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.
Spotted two small typos, but otherwise the latest changes LGTM.
sycl/doc/extensions/experimental/sycl_ext_oneapi_device_global.asciidoc
Outdated
Show resolved
Hide resolved
sycl/doc/extensions/experimental/sycl_ext_oneapi_device_global.asciidoc
Outdated
Show resolved
Hide resolved
Co-authored-by: John Pennycook <[email protected]>
This commit makes it possible to copy-construct device_global variables if they do not have the device_image_scope property. The restriction on device_image_scope is due to static construction not being allowed in device code, which they would require, while other device_globals have USM storage which will be initialized by the host code, so the constructor on the device is a simple zero-initialization.