i.MX6: Impossible to pass NULL buffer objects to clSetKernelArg()

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

i.MX6: Impossible to pass NULL buffer objects to clSetKernelArg()

549件の閲覧回数
bthebaudeau
Contributor I

Hi,

In the Vivante GPU package from i.MX6 BSP 3.0.35-4.1.0, passing NULL or a pointer thereto to clSetKernelArg() for a kernel buffer object argument (e.g. '__global uchar *buf') results in a segmentation fault.

This is a bug since, according to https://www.khronos.org/registry/cl/specs/opencl-1.1.pdf § "5.7.2 Setting Kernel Arguments":

If the argument is a buffer object, the arg_value pointer can be NULL or point to a NULL value in which case a NULL value will be used as the value for the argument declared as a pointer to __global or __constant memory in the kernel.

This is the only way of passing a NULL pointer to a kernel, so there is no workaround, apart from adding a kernel argument telling not to use the passed pointer, which anyway compels to create a dummy buffer object when not needed, but this one can be small.

I have not tested this issue with the Yocto release, but I have found nothing in the release notes indicating that such a bug has been fixed. Does anyone know?

ラベル(3)
タグ(2)
0 件の賞賛
返信
0 返答(返信)