DeepCL: Seg Fault on ClBlasInstance();
Hello! I got a segfault on ClBlasInstance();
on this piece of code: ` cl_int ret; cl_uint numberPlatform;
ret = clGetPlatformIDs(0, NULL, &numberPlatform);
if (ret != CL_SUCCESS || numberPlatform == 0) {
return 0;
} `
ret = clGetPlatformIDs(0, NULL, &numberPlatform); - crashes.
This piece of code is working fine outside of library, but in lib it is crashes.
OpenCL installed. CUDA installed. Ubuntu 16.04.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 22 (12 by maintainers)
You also need to create an OpenCL context, before instantiating a
ClBlasInstance instance;. By the way ClBlasInstance is not really a method, it’s an object. Can you put the following at the start of your main, and remove the call to ClBlasInstance?