OpenCL on etnaviv?

Philipp Zabel p.zabel at pengutronix.de
Tue Oct 20 13:05:59 UTC 2020


Hi,

On Mon, 2020-10-19 at 08:48 -0700, Tim Harvey wrote:
> On Mon, Oct 19, 2020 at 6:12 AM Christian Gmeiner
> <christian.gmeiner at gmail.com> wrote:
> > Hi Tim
> > 
> > > Could anyone explain if OpenCL can run with etnaviv? I'm also not
> > > quite understanding if OpenCL has specific hardware requirements. I
> > > have users that I support wanting to run OpenCL on an IMX8M and am
> > > finding that NXP states the IMX8MM doesn't support OpenCL (yet the
> > > IMX8MN does)  and I'm trying to understand if that is a technical
> > > issue or just simply that they won't support it through their closed
> > > Vivante driver.
> > > 
> > 
> > On the etnaviv side OpenCL is possible but nothing has done in that
> > direction and
> > needs work to get it up and running. Hardware wise it should work on GPUs with
> > SSBOs and Images support. Intuitively it should work on most Vivante GPUs. Also
> > you might have a look https://en.wikipedia.org/wiki/Vivante_Corporation
> > 
> 
> Christian,
> 
> Thanks - this is very helpful. I found some info about what a Shader
> Storage Buffer Object (SSBO) is but I haven't managed to find what you
> mean by Images support. I'm also not clear how to tell what Vivante
> GPU's have this support. The wikipedia page doesn't go into detail on
> SSBO's and Images support. Where do you typically find this info?

The i.MX Graphics Users Guide [1], chapter 5.3.9 "Using buffers instead
of images" makes it look like image support (support for
read/write_image* OpenCL functions) is always emulated in the shaders.

[1] https://www.nxp.com/docs/en/user-guide/i.MX_Graphics_User%27s_Guide_Linux.pdf

> What led me to post this question was NXP stating that the IMX8MM does
> not support OpenCL or Vulkan whereas the other IMX8M's (IMX8MN,
> IMX8MP, and IMX8MQ) do. I wasn't clear if it was a limitation in what
> NXP offers through the Vivante driver or if this was a technical
> limit. It would appear that it is likely both but more so a technical
> limit.

There's a separate hardware API mode for OpenCL compute shader dispatch.
Some features may be emulated in software, but at least that and memory
load/store instructions must be supported by the hardware.

> > > I suppose for my own education I also have the same question about
> > > Vulkan. Is there specific GPU hardware requirements for that? My
> > > understanding is that things like OpenCL and Vulkan are just software
> > > API's to tap into the hardware units.
> > 
> > I am a big vulkan newbie but I think the baseline for vulkan is ES 3.1. So any
> > GPU where we can support ES 3.1 could also be driven by the Vulkan API.
> 
> The IMX8MM has a GC NanoUltra (1 shader) supporting OpenGL ES 2.0 and
> a GC502L for 2D from what I can find. So if the baseline is ES 3.1
> there would never be any hope for Vulkan on that. I'm assuming the
> GLES API's are implemented in hardware and not some sort of
> abstraction layer.

Given that the Vivante homepage listed OpenCL support as optional for
GCNano Ultra, I believe that the implementation on i.MX8MM may have the
required hardware features for compute shaders disabled.

regards
Philipp


More information about the etnaviv mailing list