Because ion.h interface has changed, qcom-opencl-sdk-1.2.2 to test sample("Error 20 allocating ion memory: ")in Android Q(kernel-4.19) msm865 device. Do qcom-opencl-sdk upaate in newest kernel version later?
opencl:ion-alloc-buffer error
Posted: Tue, 2021-01-12 22:46
There is an error in function where the context is being created - one of the parameters is being passed at wrong position.
Instead:
cl_context context = clCreateContext(NULL, 1, &device, NULL, &err, NULL);
Should be:
cl_context context = clCreateContext(NULL, 1, &device, NULL, NULL, &err); ^^^^^^^^^^
Also the way the error are output is still not much helpful. Should be something like this:
cl_context context = clCreateContext(NULL, 1, &device, NULL, NULL, &err); if (err != CL_SUCCESS) { cout << err << "clCreateContext"; return -1; }
This way we stop the code execution when the error occurred and we know for which function it happened.
Where do you see the error code?
I see below code in qcom_opencl_sdk 1.22
m_context = clCreateContext(NULL, 1, &m_device, NULL, NULL, &err);
Thanks