Skip to content

[SYCL][SubBlockNDRange] Extend spec to allow dealing with USM pointers #849

Closed
@bjoo

Description

@bjoo

Hi, following conversations with @jbrodman and @Pennycook I am leaving this issue here as a placeholder. Currently the SubGroupNDRange Load and Save functions use sycl::multi_ptr<>
It would be good if they could accept raw USM pointers, both to connect up the USM and SubGroupNDRange extensions and also to provide for the possibility of casting. The use case for casting is in the case of SIMD operations. It may make sense allocate buffers based on SIMD Classes e.g. sycl::vec<T,N>. In the case of SYCL buffers this means that the accessors to the buffer are of type sycl::accessor<vec<T,N>,...> and the pointers returned by the accessors get_pointer() method (which convert to multi_ptr<>) are vec<T,N>* However, for the load and save of SIMD data
a regular multi_ptr or T* (USM) would be more appropriate. Accessors cannot be cast, and neither can multi_ptr<> as far as I know. However USM pointers can. In that case if one allocated with a USM appropriate malloc( N * vec<T,N> ) and indexed the array in units of vec<T,N> it would always be easy to cast the pointer to type T*

Metadata

Metadata

Assignees

Labels

spec extensionAll issues/PRs related to extensions specifications

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions