Asynchronous API

Given that OpenCL is designed for an API for heterogeneous programming, it, by definition, has a huge penalty for latency associated with it. Therefore, it MUST be an asynchronous API.

I find it difficult to find an asynchronous API in OpenCL.net. I found the OpenCl.Net.Event , which seems to be the out parameter in most API calls. However, I can not find the answer to the event in any way, since opencl.net missing in clSetEventCallback .

Does anyone know how to await perform an asynchronous operation in opencl.net ?

EDITOR: I hate it when people go down without comment. For the record, I worked a little on this topic, now I am reading a book about OpenCL, I even uploaded the source code to the OpenCL.net project to no avail. OpenCL.net has some documentation.

+6
source share
1 answer

I don't know much about OpenCL.net, but not CommandQueue , what are you looking for? Can you pause all your aynch tasks with the Finish command until all tasks are completed?

For example: The basics of GPGPU image processing using OpenCL.NET in the Image Processing Part

For clSetEventCallback, I found only clFinish or clWaitForEvents.

Referring to your statement:

it seems clSetEventCallback is missing in opencl.net

I could not find a way to do what you want, sorry.

EDIT : This seems to be very intestring: Google-Code / GPUTracer . You should take a look at OpenCL.cs and Event.cs. I think they solved your problem.

+1
source

Source: https://habr.com/ru/post/977586/


All Articles