2

CL_DEVICE_NOT_AVAILABLE运行此示例代码时出现错误。但是,与那个问题不同的是,我的 CPU,Intel Core 2 Duo E8500 CPU,似乎是受支持的。我已经确保链接到 OpenCL 库的 Intel 版本,因为我还安装了 Nvidia 库。为什么会出现这个错误?

4

3 回答 3

4

英特尔 OpenCL SDK 2013 需要 SSE 4.2。据我所知(这里)Intel Core 2 Duo E8500 CPU 只有 SSE 4.1

“CL_DEVICE_NOT_AVAILABLE”是您尝试在不受支持的 CPU 上创建 OpenCL 设备时遇到的错误。

对您来说好消息是英特尔 OpenCL SDK 2012 在 SSE 4.1 上运行;您应该卸载 2013 SDK 并改用 2012 SDK(或获取更新的 CPU)。

于 2013-08-23T01:01:59.797 回答
2

"CL_DEVICE_NOT_AVAILABLE" has nothing to do with the SDK. It's due to the OpenCL device driver which is part of the video card device driver.

It's common to confuse the SDK and the OpenCL device driver. You develop the host code with the SDK but the kernel is compiled and run through the device driver. I often develop with the Intel SDK but I run my kernels on the CPU using the Intel video driver or the AMD Radeon drivers and on the GPU using the Nvidia video drivers (GTX590). I have all three video drivers installed in Windows. You don't have to have an AMD video card to instal the Radeon drivers.

So in your case you can use the AMD drivers to run your kernel on the CPU. They are much less restrictive than Intel's.

On windows I get faster results running my Kernel on my Sandy Bridge CPU using the Intel OpenCL drivers than AMD. However, on Linux the AMD driver runs my kernel faster on my Intel CPU than the Intel driver does.

于 2013-08-23T13:35:11.120 回答
0

我在创建关于如何在 Ubuntu 18.04 上安装 hashcat 的教程时遇到了这个错误;我已包含以下有关为英特尔® 处理器安装 OpenCL™ 运行时的说明 - 选项 A(推荐)- 请随时查看我在 GitHub 上的完整要点。希望有帮助!

为英特尔® 处理器安装 OpenCL™ 运行时

为英特尔® 处理器安装 OpenCL™ 运行时 - 选项 A(推荐)

  1. 通过运行以识别 CPU 类别来检查您的 CPU 系统处理器架构,sudo lscpu例如“Intel (R) Core (TM) i7-7700 CPU @ 3.60Ghz”——或者,您可以转到设置 > 详细信息,这也将显示 CPU 系列(例如 Intel (R) HD Graphics 630 (Kaby Lake GT2))。
  2. 前往英特尔开发者专区并向下滚动至您系统的相应下载链接;假设您正在运行 Ubuntu 18.04 并拥有 Intel Core 级 CPU,向下滚动到“Linux* OS Ubuntu* 16.04.x (deb)”并单击18.46.11837 Runtimes 的 Github 链接以访问运行时包下载。
  3. 上述 Github 存储库中应该有说明,或者您可以在接下来的步骤中继续执行以下操作。
  4. cd ~/Desktop
  5. mkdir neo
  6. cd neo
  7. sudo wget https://github.com/intel/compute-runtime/releases/download/18.46.11837/intel-gmmlib_18.4.0.348_amd64.deb
  8. wget https://github.com/intel/compute-runtime/releases/download/18.46.11837/intel-igc-core_18.44.1060_amd64.deb
  9. wget https://github.com/intel/compute-runtime/releases/download/18.46.11837/intel-igc-opencl_18.44.1060_amd64.deb
  10. wget https://github.com/intel/compute-runtime/releases/download/18.46.11837/intel-opencl_18.46.11837_amd64.deb
  11. 通过运行安装软件包sudo dpkg -i *.deb
  12. 通过运行重新启动系统sudo reboot

为英特尔® 处理器安装 OpenCL™ 运行时 - 选项 B

  1. 转到Intel OpenCL Runtimes 网站并向下滚动到页面底部以下载 Intel CPU Runtime for OpenCL Applications 18.1 for LINUX OS(仅限 64 位)。
  2. 下载适用于英特尔处理器的 OpenCL 运行时后,cd ~/Downloads
  3. 运行sudo tar -xzf l_opencl_p_18.1.0.013.tgz解压 tgz 文件 - 请注意,OpenCL 文件版本可能会从本要点开始更新(即,截至本要点,版本为 18.1.0.013。)
  4. cd l_opencl_p_18.1.0.013
  5. sudo ./install.sh
  6. 提示欢迎屏幕 - 按住“Enter”键直到能够输入“我不同意收集我的信息”选择“2”
  7. 点击“1”
  8. 点击“1”
  9. 点击“Enter”,然后重新启动计算机。
  10. 如果在测试 hashcat 后遇到任何其他英特尔 OpenCL 错误,请转到“为英特尔® 处理器安装 OpenCL™ 运行时 - B”部分 - 如果没有,请继续“测试 Hashcat”部分
于 2018-12-02T00:21:51.270 回答