Forums - opencl:ion-alloc-buffer error

3 posts / 0 new
Last post
opencl:ion-alloc-buffer error
andrew.wu
Join Date: 21 Dec 20
Posts: 2
Posted: Tue, 2021-01-12 22:46

          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?

  • Up0
  • Down0
ba.bakzahedi7141
Join Date: 3 Aug 22
Posts: 1
Posted: Wed, 2022-08-03 00:40

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.

 

 

  • Up0
  • Down0
DuBo
Join Date: 9 Dec 13
Posts: 72
Posted: Fri, 2022-09-02 08:17

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);

    if (err != CL_SUCCESS)
    {
        std::cerr << "Error " << err << " with clCreateContext." << "\n";
        std::exit(err);
    }

Thanks
Bob Du
  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.