This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Mali-G71 "Failed creating base context during opening of kernel driver" while get device infos using OpenCL

I try to write some code using OpenCL to test Mali GPU:

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
err = clGetPlatformIDs(0, NULL, &num_platforms);
check_error(err, "clGetPlatformIDs");
if (num_platforms > 0)
{
printf("Number of platforms: %d\n", num_platforms);
}
else
{
fprintf(stderr, "No OpenCL platforms found.\n");
exit(-1);
}
platforms = (cl_platform_id *)malloc(num_platforms * sizeof(cl_platform_id));
err = clGetPlatformIDs(num_platforms, platforms, NULL);
check_error(err, "clGetPlatformIDs");
for (int i = 0; i < num_platforms; i++)
{
cl_platform_id platform = platforms[i];
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

But it returns `CL_OUT_OF_HOST_MEMORY` (-6):

Fullscreen
1
2
3
4
5
6
7
8
Number of platforms: 1
Platform 0: ARM Platform
Platform 0: FULL_PROFILE
Platform 0: OpenCL 2.0 v1.r9p0-01rel0.37c12a13c46b4c2d9d736e0d5ace2e5e
Number of devices: 1
Failed creating base context during opening of kernel driver.
Kernel module may not have been loaded
Error during operation 'clGetDeviceInfo': -6
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

I don't know what's wrong with my code.

0