0

我创建了一些基准程序来测试 OpenCL 的一些特性。这已经在多个平台上运行:核心 i7-920/nvidia 1060 和双 Xeon-2660/Radeon 480。这一切都很好。当我在 Surface 3 Pro 上运行它时,我得到以下输出:

Platform Intel(R) OpenCL contains 2 devices
   Device does not support double precision, skipped: CLDevice [id: 3642688 name: Intel(R) HD Graphics 5000 type: GPU profile: FULL_PROFILE]
   CLDevice [id: 3632160 name: Intel(R) Core(TM) i7-4650U CPU @ 1.70GHz type: CPU profile: FULL_PROFILE]
  Platform: plIntel, processor: ptIntel, double fp: true, AMD fp: false


Devices used:
CLDevice [id: 3632160 name: Intel(R) Core(TM) i7-4650U CPU @ 1.70GHz type: CPU profile: FULL_PROFILE]

Running benchmark for 1 devices.
Benchmarking Intel(R) Core(TM) i7: 0 1 2 3 4 4409 ms
Queue pool, tasks per queue = 16: 0 Exception in thread "main" com.jogamp.opencl.CLException$CLBuildProgramFailureException: 
CLDevice [id: 3642688 name: Intel(R) HD Graphics 5000 type: GPU profile: FULL_PROFILE] build log:
:2:40: error: use of type 'double' requires cl_khr_fp64 extension to be enabled
:3:40: error: use of type 'double' requires cl_khr_fp64 extension to be enabled
:4:34: error: use of type 'double' requires cl_khr_fp64 extension to be enabled
:22:40: error: use of type 'double' requires cl_khr_fp64 extension to be enabled
:23:40: error: use of type 'double' requires cl_khr_fp64 extension to be enabled
:24:34: error: use of type 'double' requires cl_khr_fp64 extension to be enabled
:42:40: error: use of type 'double' requires cl_khr_fp64 extension to be enabled
:43:40: error: use of type 'double' requires cl_khr_fp64 extension to be enabled
:44:34: error: use of type 'double' requires cl_khr_fp64 extension to be enabled
:63:40: error: use of type 'double' requires cl_khr_fp64 extension to be enabled
:64:40: error: use of type 'double' requires cl_khr_fp64 extension to be enabled
:65:34: error: use of type 'double' requires cl_khr_fp64 extension to be enabled

error: front end compiler failed build. [error: CL_BUILD_PROGRAM_FAILURE]
    at com.jogamp.opencl.CLException.newException(CLException.java:84)

如您所见,图形和处理器都被识别,但图形不支持双精度并被软件跳过。然而,处理器应该支持双精度。但是是不编译的。Surface 3 pro 是否有一些特定的东西无法运行?它在 Java 和 jocl 上运行。

编辑

该软件会构建一个设备列表,并且只选择拥有 cl_khr_fp64 属性的设备。Surface 3 pro(i7-4950U)的 CPU 确实具有此属性。在 .CL 代码中,第一行是:#pragma OPENCL EXTENSION cl_khr_fp64 : enable.

4

0 回答 0