我成功地安装了ArrayFire,当我选择Visual Studio配置CUDA_x64时,示例helloworld工作得很好。但是,当我更改为OpenCL_x64时,编译成功,但我得到运行错误,如下所示:
/*********************************************************************/
ArrayFire Exception (Internal error:998):
In function __cdecl opencl::DeviceManager::DeviceManager(void)
In file src\backend\opencl\platform.cpp:329
OpenCL Error (-2): Device Not Available when calling clCreateContext
In function void __cdecl af::setDevice(const int)
In file src\api\cpp\device.cpp:91/*********************************************************************/
任何答案都将不胜感激。提前谢谢。
发布于 2016-06-07 20:23:40
是-2 \f25 CL_DEVICE_NOT_AVAILABLE -2\f6,它发生在-2\f25“如果设备中的设备当前不可用,即使该设备由-2\f25 clGetDeviceIDs 2\f6返回”。您可以在谷歌上搜索错误的名称,并找到许多描述可能发生这种情况的网页;两种常见的情况是在较早的芯片上使用英特尔CPU驱动程序(最新的英特尔OpenCL软件开发工具包需要SSE4.2),或者在OpenCL/OpenGL互操作不可用时请求OpenCL/OpenGL互操作。
https://stackoverflow.com/questions/37673459
复制相似问题