imx8 openCL clBuildProgram error

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

imx8 openCL clBuildProgram error

ソリューションへジャンプ
2,108件の閲覧回数
1019599657
Contributor III

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?5.png

0 件の賞賛
1 解決策
1,982件の閲覧回数
1019599657
Contributor III

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. 

元の投稿で解決策を見る

0 件の賞賛
3 返答(返信)
1,982件の閲覧回数
Bio_TICFSL
NXP TechSupport
NXP TechSupport

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

0 件の賞賛
1,982件の閲覧回数
1019599657
Contributor III

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"\
    " } "


0 件の賞賛
1,983件の閲覧回数
1019599657
Contributor III

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. 

0 件の賞賛