OpenCL CVMS_ERROR_SERVICE_FAILURE: CVMS compiler has crashed or hung managing the service?

老子叫甜甜 提交于 2020-03-04 05:06:27

问题


i have this output from the compiler with clGetProgramBuildInfo from this kernel:

CVMS_ERROR_SERVICE_FAILURE: CVMS compiler has crashed or hung managing the service

__kernel void vadd(
__global char* char_array,
int m,
int n,
__global long* result)
{

int index = get_global_id(0);
int max_n = n/m;
if(index == m-1){
    max_n = n - (n/m)*(m-1);
}

long max[ max_n ];
int offset = log2((double)m);

for (int it=0; it < max_n; it++)
{
    __global char* bits = &(char_array[64*(n/m)*(index-1)+it*64]);
    int count=0;
    for(int i=offset; i<=64; i++)
    {
        if(bits[i]=='0'){
            count++;
        }else{
            break;
        }
    }
    max[it] = count;
}

*result = 0;
long tmp = 0;
for(int i=0; i<max_n;i++)
{
    if(max[i] > *result){*result = max[i];}
}
*result = tmp +1;
}

i get this output changing the line "int offset = log2(m);" in "int offset = log2((double)m);" before the compiler log the the call to log2(m) was ambiguous how can i call log2 properly? Thanks

来源:https://stackoverflow.com/questions/60082588/opencl-cvms-error-service-failure-cvms-compiler-has-crashed-or-hung-managing-th

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!