Open hughperkins opened 8 years ago
Line 252 is basically this:
#ifdef AUTOGEMM_PRINT_DEBUG
printf("makeGemmKernel: Creating program from source\n");
#endif
clProgram = clCreateProgramWithSource(
clContext,
1, &kernelSource,
NULL, &err );
CL_CHECK(err)
err = clBuildProgram(
clProgram,
1, &clDevice,
sourceBuildOptions, NULL, NULL );
CL_CHECK(err)
}
Associated test scenario:
TEST(testClBlas, basic) {
EasyCL *cl = EasyCL::createForFirstGpuOtherwiseCpu();
float A[] = {1, 3,
2, 7,
9, 5};
float B[] = {3,
-1};
float C[3];
ClBlasInstance clblasInstance;
CLWrapper *AWrap = cl->wrap(6, A);
CLWrapper *BWrap = cl->wrap(2, B);
CLWrapper *CWrap = cl->wrap(3, C);
AWrap->copyToDevice();
BWrap->copyToDevice();
CWrap->createOnDevice();
ClBlasHelper::Gemm(
cl,
clblasRowMajor,
clblasNoTrans, clblasNoTrans,
3, 2, 1,
1,
AWrap, 0,
BWrap, 0,
0,
CWrap, 0
);
cl->finish();
CWrap->copyToHost();
EXPECT_EQ(0, C[0]);
EXPECT_EQ(-1, C[1]);
EXPECT_EQ(22, C[2]);
cl->finish();
delete CWrap;
delete BWrap;
delete AWrap;
cl->finish();
delete cl;
// clblasTeardown();
}
Can you test with the nvidia driver on linux and another vendor's driver on windows? The -11 error codes maps to CL_BUILD_PROGRAM_FAILURE. I've been running into this on mesa, but it is probably unrelated.
Also, it's be useful to know if your driver relies on a LLVM backend for it's openCL compilation or something custom. I'm not sure if that information is available.
On linux, using nvidia 352.55 driver, works ok.
For Windows, I'm using Amazon EC2, on a g2 box. Tricky to use a different vendor's driver I would think :-)