Questions about running OpenCL accelelator


I’m thinking about creating OpenCL based design for PYNQ.

I was wondering if it is possible to run multiple accelerators in workgroups like in C++

Q.enqueueNDRangeKernel(K, NullRange, NDRange(1024), NDRange(128));

Can you set number of used accelelators in PYNQ?
I only saw something like this in documentation, output_buf)
ol.my_kernel.start(input_buf, output_buf)

But this is calling only one kernel at the time.
Is it possible to start multiple kernels by setting NDRange or something like that in Python?

In the end I would like to generate for example five computation kernels and run some computations on them. For example run mul_add operation on one compute unit, then add another compute unit and check speed etc… is this possible with Pynq?

Thanks for information :slight_smile:

We don’t have support for an ndrange operation in the current release. We’re thinking of ways of adding that in a Python-like way in the future.

.start is an asynchronous function so you can run multiple accelerators at the same time by starting them at the same time then waiting for them but that’s the only functionality in the current release. You would need to package up the work-units manually rather than using an ndrange operation.