cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

alazaro
Adept II

Asynchronous clCreateBuffer?

Hi everyone !!

I would ask you if the clCreateBuffer function could be asynchronously executed with other cl commands like memory transfers and kernels.

Thanks in advance.

0 Likes
1 Reply
dipak
Big Boss

Hi,

clCreateBuffer API doesn't act like this. In general, OpenCL APIs which support en-queuing a task to a command queue have form like "clEnqueue<task>".

Also, memory objects are valid for all the devices within the context, whereas commands and command queues are device specific. Runtime manages actual allocation (such as location and time of allocation) depending on the memory flag and usage.

You may check below API which provides explicit control over the location of the memory objects and ensures that an object is allocated on a specific device prior to usage. More importantly, it supports clEnqueue<> form.

clEnqueueMigrateMemObjects

Regards,