CPU 未列为使用 Windows 的设备
CPU is not listet as a device using Windows
我打算对 CPU 和 GPU 之间的差异进行基准测试。
问题是,我只能取回我的 GPU,我的 CPU 没有显示 。
此程序在 OSX 上产生 正确的 输出。那里列出了 CPU 以及 GPU:
public static void displayInfo() {
for (int platformIndex = 0; platformIndex < CLPlatform.getPlatforms().size(); platformIndex++) {
CLPlatform platform = CLPlatform.getPlatforms().get(platformIndex);
System.out.println("Platform #" + platformIndex + ":" + platform.getInfoString(CL_PLATFORM_NAME));
List<CLDevice> devices = platform.getDevices(CL_DEVICE_TYPE_ALL);
for (int deviceIndex = 0; deviceIndex < devices.size(); deviceIndex++) {
CLDevice device = devices.get(deviceIndex);
System.out.printf(Locale.ENGLISH, "Device #%d(%s):%s\n",
deviceIndex,
UtilCL.getDeviceType(device.getInfoInt(CL_DEVICE_TYPE)),
device.getInfoString(CL_DEVICE_NAME));
}
}
}
我的输出:
Platform #0:NVIDIA CUDA
Device #0(GPU):GeForce GTX 560 Ti
Device #1(GPU):GeForce GTX 560 Ti
我的电脑:
- 英特尔 i5-2500K
- Windows 8.1 专业版 (x64)
- 2x GeForce GTX 560 Ti
我正在使用 lwjgl
版本 2.8.4
为什么我无法取回我的 CPU?
(重新发布评论的答案)
OS X 有点独特,因为它预装了 OpenCL CPU 驱动程序,因此 OpenCL 可以工作 'out-of-the-box'。在 Windows 和 Linux 上,您需要为 CPU 安装 OpenCL runtime/driver。对于 Intel CPUs,您可以在这里找到它们:
我打算对 CPU 和 GPU 之间的差异进行基准测试。 问题是,我只能取回我的 GPU,我的 CPU 没有显示 。
此程序在 OSX 上产生 正确的 输出。那里列出了 CPU 以及 GPU:
public static void displayInfo() {
for (int platformIndex = 0; platformIndex < CLPlatform.getPlatforms().size(); platformIndex++) {
CLPlatform platform = CLPlatform.getPlatforms().get(platformIndex);
System.out.println("Platform #" + platformIndex + ":" + platform.getInfoString(CL_PLATFORM_NAME));
List<CLDevice> devices = platform.getDevices(CL_DEVICE_TYPE_ALL);
for (int deviceIndex = 0; deviceIndex < devices.size(); deviceIndex++) {
CLDevice device = devices.get(deviceIndex);
System.out.printf(Locale.ENGLISH, "Device #%d(%s):%s\n",
deviceIndex,
UtilCL.getDeviceType(device.getInfoInt(CL_DEVICE_TYPE)),
device.getInfoString(CL_DEVICE_NAME));
}
}
}
我的输出:
Platform #0:NVIDIA CUDA
Device #0(GPU):GeForce GTX 560 Ti
Device #1(GPU):GeForce GTX 560 Ti
我的电脑:
- 英特尔 i5-2500K
- Windows 8.1 专业版 (x64)
- 2x GeForce GTX 560 Ti
我正在使用 lwjgl
版本 2.8.4
为什么我无法取回我的 CPU?
(重新发布评论的答案)
OS X 有点独特,因为它预装了 OpenCL CPU 驱动程序,因此 OpenCL 可以工作 'out-of-the-box'。在 Windows 和 Linux 上,您需要为 CPU 安装 OpenCL runtime/driver。对于 Intel CPUs,您可以在这里找到它们: