__kernel void mnist_simple (__global const float restrict dev_x, //2828
__global const float restrict dev_w, //78410
__global const float *restrict dev_b,//10
__global float *restrict dev_y) //10
{
float rt[10]={0.0};
for (int k=0;k<10;k++)
{
for (int i=0;i<784;i++)
{
rt[k]=rt[k]+dev_x[i]dev_w[k+i10];
}
dev_y[k]=rt[k]+dev_b[k];
}
}
能够编译完成。
方便的话将ERROR的报错信息文本发一下,不要截图。