Question on clEnqueueMigrateMemObjects()

I have few things that I don’t understand when using clEnqueueMigrateMemObjects().

1.Let’s say I have two command queues (cmdq0 and cmdq1) that are associated with each OpenCL device (device 0 and device 1). And let’s say that the cl_mem objects b0 and b1 are written for cmdq0 and cmdq1, respectively. When I call clEnqueueMigrateMemObjects() like the following

err = clEnqueueMigrateMemObjects(cmdq0, &b1, CL_MIGRATE_MEM_OBJECT_UNDEFINED, 0, NULL, NULL);

does this mean that 'the buffer b1 is transferred to the cmdq0'? or ‘the ownership of the buffer b1 is transferred to the cmdq0, so that the buffer transfer kernel should be executed ?’.

2.Once the buffer b1 is transferred to cmdq0, does this state stay this way until clEnqueueMigrateMemObjects() is called again (with switched input from the above example)? or is this just a one time thing?

3.So, before any kernel execution is made, the arguments should be set using clSetKernelArg(). But, once a buffer transfer is made by clEnqueueMigrateMemObjects() should there be an additional process of clSetKernelArg() for the transferred buffer?

Thanks.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.