Using 64bit android library with OpenCL give error clSetKernelArg -51 at run time

Hi,

It is a question i asked on khronos forum but i had no answer. So i try to ask the question here.

When i try to use 64bit libraries to build my APK i always got the same error on my booth phonne hauwei honnor play and xiaomi 13T pro.

If someone could explain me why.

Parents
  • It is impossible to give any specific advice without a minimal reproducer with some detail of the kernel and how you are calling the API call. 

    This error is CL_INVALID_ARG_SIZE which is returned if ...

    CL_INVALID_ARG_SIZE if arg_size does not match the size of the data type for an argument that is not a memory object or if the argument is a memory object and arg_size != sizeof(cl_mem) or if arg_size is zero and the argument is declared with the local qualifier or if the argument is a sampler and arg_size != sizeof(cl_sampler).

    If this works on a 32-bit build, I'd assume that you are using sizeof() of a C data type which is mismatched with the CL type so you get a size difference when switching bitness due to the two type sizes diverging, but I'm guessing at this point. 

    If this doesn't help, can you share more specifics about what you are doing?

Reply
  • It is impossible to give any specific advice without a minimal reproducer with some detail of the kernel and how you are calling the API call. 

    This error is CL_INVALID_ARG_SIZE which is returned if ...

    CL_INVALID_ARG_SIZE if arg_size does not match the size of the data type for an argument that is not a memory object or if the argument is a memory object and arg_size != sizeof(cl_mem) or if arg_size is zero and the argument is declared with the local qualifier or if the argument is a sampler and arg_size != sizeof(cl_sampler).

    If this works on a 32-bit build, I'd assume that you are using sizeof() of a C data type which is mismatched with the CL type so you get a size difference when switching bitness due to the two type sizes diverging, but I'm guessing at this point. 

    If this doesn't help, can you share more specifics about what you are doing?

Children