Hi , i use opencl at imx8 , i meet a error . when it run to the status=clBuildProgram(pgram,1,device,option,NULL,NULL), it will return error:CL_BUILD_PROGRAM_FAILURE . I use clGetProgramBuildInfo to get error, i can get this error:
Build Log : error : Failed to open the temporary file /data/vendor/.opencl-cache/cl-640601. for writing.
How i can solve this error?
Solved! Go to Solution.
Hi , i do clGetProgramBuildInfo to get the error information ,log is:Failed to open the temporary file "/data/vendor/.opencl-cache/cl-xxx" for writing.
My kernel is only:
#define KERNEL_SRC "\n" \ "__kernel void hello_kernel(__global const float *a,__global const float *b, __global float *result) \n "\ "{ \n "\ " int gid = get_global_id(0); \n "\ " result[gid] = a[gid] + b[gid]; \n"\ " } "
I also do it on xiaomi6x, and i can run process.
Hello Li,
This error is typically caused by a syntax error in your kernel code. You can call the OpenCL function clGetProgramBuildInfo with the flag CL_PROGRAM_BUILD_LOG to access the log generated by the compiler. This log contains the output you are probably used to when compiling on the command-line (errors, warnings, etc.).
Regards
Hi, i do "clGetProgramBuildInfo" to get error log,
the log is: error : Failed to open the temporary file /data/vendor/.opencl-cache/cl-612501. for writing,
statues is CL_BUILD_PROGRAM_FAILURE.
My kernel code is below. And i alse run it on xiaomi phone . I can run it success. How i can solve it ?
#define KERNEL_SRC "\n" \ "__kernel void hello_kernel(__global const float *a,__global const float *b, __global float *result) \n "\ "{ \n "\ " int gid = get_global_id(0); \n "\ " result[gid] = a[gid] + b[gid]; \n"\ " } "
Hi , i do clGetProgramBuildInfo to get the error information ,log is:Failed to open the temporary file "/data/vendor/.opencl-cache/cl-xxx" for writing.
My kernel is only:
#define KERNEL_SRC "\n" \ "__kernel void hello_kernel(__global const float *a,__global const float *b, __global float *result) \n "\ "{ \n "\ " int gid = get_global_id(0); \n "\ " result[gid] = a[gid] + b[gid]; \n"\ " } "
I also do it on xiaomi6x, and i can run process.