OpenCL* for CPU
Ask questions and share information on Intel® SDK for OpenCL™ Applications and OpenCL™ implementations for Intel® CPU.
公告
This forum covers OpenCL* for CPU only. OpenCL* for GPU questions can be asked in the GPU Compute Software forum. Intel® FPGA SDK for OpenCL™ questions can be ask in the FPGA Intel® High Level Design forum.
1736 讨论

Kernel doesn't finish building on CPU

Vishvas
新手
2,199 次查看

The following kernel runs fine on my GPU (GTX 1060) and my iGPU on my i5-6500

But if I run this on my CPU, it doesn't go past the clBuildProgram function 

I don't get any error, the clBuildProgram executes forever

 

__kernel void multiply(__global int* res, __global int* b, __global int* p, __global int* r,  __global int* q, const int count, const int am, const int bn)
{
    int l, j, k;
    
    int i = get_global_id(0);

    //printf("\n\n%d", i);

    {
        for(j = 0; j < am;)
        {
            l = 0;
            for (int k = 0; k < count; k++)
            {
                *(res + j * bn + i) += p[k] * *(b + r[k] * bn + i);

                if (k == (q[l + 1] - 1))
                {
                    j++;
                    l++;
                }
            }
        }
    }
}

 

 

I was able to recreate this error on a different PC as well

Why is this happening and how can I fix this?

 

Thank you 

标签 (1)
2 回复数
Sergey_I_Intel1
2,172 次查看

Hello,

 

Condition, in theory, can be triggered rarely, and it depends on "q", and what's there.

Can you send your host_code, where you run this kernel?

 

Best regards,

Sergey

0 项奖励
Vishvas
新手
2,167 次查看

I've attached the host code

One thing I noticed is that if I uncomment the print statement in my kernel, then the code runs without any issues

The clBuildProgram function is in line 305

0 项奖励
回复