Skip to content

Provide example for shared system USM using malloc()#200

Open
mabraham wants to merge 2 commits intoKhronosGroup:mainfrom
mabraham:use-system-malloc-in-system-allocation-example
Open

Provide example for shared system USM using malloc()#200
mabraham wants to merge 2 commits intoKhronosGroup:mainfrom
mabraham:use-system-malloc-in-system-allocation-example

Conversation

@mabraham
Copy link
Contributor

It's important to be clear to users that with suitable hardware and kernel, one does not have to change anything to do with memory allocation.

It's important to be clear to users that with suitable hardware and
kernel, one does not have to change anything to do with memory
allocation.

int main() {
// Create a default queue to enqueue work to the default device
sycl::queue myQueue;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to check if the device support aspect::usm_system_allocations (https://registry.khronos.org/SYCL/specs/sycl-2020/html/sycl-2020.html#api:aspect-usm-system-allocations)

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