Skip to content

[SYCL] Fix multi_ptr ctor for extended address spaces #9869

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

Merged

Conversation

steffenlarsen
Copy link
Contributor

The sycl_ext_usm_address_spaces extension adds the ext_intel_global_device_space address space together with additional multi_ptr constructors for creating a multi_ptr from an accessor. However, the current implementation fails to construct the multi_ptr from an accessor when the extended address space decorations are enabled (through ENABLE_USM_ADDR_SPACE) as it attempts to use the normal global address space decoration.
This commit fixes these constructors by doing a legal cast of the underlying global-space pointer to a ext_intel_global_device_space decorated pointer.

The sycl_ext_usm_address_spaces extension adds the
ext_intel_global_device_space address space together with additional
multi_ptr constructors for creating a multi_ptr from an accessor.
However, the current implementation fails to construct the multi_ptr
from an accessor when the extended address space decorations are enabled
(through __ENABLE_USM_ADDR_SPACE__) as it attempts to use the normal
global address space decoration.
This commit fixes these constructors by doing a legal cast of the
underlying global-space pointer to a ext_intel_global_device_space
decorated pointer.

Signed-off-by: Larsen, Steffen <steffen.larsen@intel.com>
@steffenlarsen steffenlarsen requested a review from a team as a code owner June 14, 2023 10:27
@steffenlarsen steffenlarsen requested a review from bso-intel June 14, 2023 10:27
@steffenlarsen steffenlarsen temporarily deployed to aws June 14, 2023 10:43 — with GitHub Actions Inactive
@steffenlarsen steffenlarsen temporarily deployed to aws June 14, 2023 11:32 — with GitHub Actions Inactive
@steffenlarsen steffenlarsen merged commit a69e515 into intel:sycl Jun 14, 2023
fineg74 pushed a commit to fineg74/llvm that referenced this pull request Jun 15, 2023
The sycl_ext_usm_address_spaces extension adds the
ext_intel_global_device_space address space together with additional
multi_ptr constructors for creating a multi_ptr from an accessor.
However, the current implementation fails to construct the multi_ptr
from an accessor when the extended address space decorations are enabled
(through __ENABLE_USM_ADDR_SPACE__) as it attempts to use the normal
global address space decoration.
This commit fixes these constructors by doing a legal cast of the
underlying global-space pointer to a ext_intel_global_device_space
decorated pointer.

Signed-off-by: Larsen, Steffen <steffen.larsen@intel.com>
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.

2 participants