4

我正在尝试从 Snapdragon 820 设备(三星 Galaxy S7)上的 Adreno 530 GPU 获取 CL_DEVICE_MAX_COMPUTE_UNITS 和 CL_DEVICE_MAX_CLOCK_FREQUENCY 设备信息。但是,对于 CL_DEVICE_MAX_COMPUTE_UNITS,我得到 4,对于 CL_DEVICE_MAX_CLOCK_FREQUENCY,我得到 1。这似乎是错误的,因为 CL_DEVICE_MAX_CLOCK_FREQUENCY = 1 表示 1 MHz。以下是我提取这些信息的代码:

cl_uint buf_uint;
clGetDeviceInfo(device.get(), CL_DEVICE_MAX_COMPUTE_UNITS, sizeof(buf_uint), &buf_uint, NULL);
printf("  DEVICE_MAX_COMPUTE_UNITS = %u\n", (unsigned int)buf_uint);
clGetDeviceInfo(device.get(), CL_DEVICE_MAX_CLOCK_FREQUENCY, sizeof(buf_uint), &buf_uint, NULL);
printf("  DEVICE_MAX_CLOCK_FREQUENCY = %u\n", (unsigned int)buf_uint);

注意:设备的类型为 cl::Device。

对于 Mac,它似乎可以正常工作。我为 Intel Iris Pro 获得 40 个计算单元和 1200 MHz 时钟频率。

4

1 回答 1

0

我在 SDM665 SDM845 上有同样的问题...,

[INFO][OCL INFO] DEVICE MAX CLOCK FREQUENCY (1) MHz

我怀疑高通不想透露这个秘密......

[INFO][OCL INFO] OPENCL DEVICE BASIC INFO:
[INFO][OCL INFO] CL_DEVICE_TYPE : CL_DEVICE_TYPE_GPU
[INFO][OCL INFO] CL_DEVICE_NAME : QUALCOMM Adreno(TM)
[INFO][OCL INFO] CL_DEVICE_VENDOR       : QUALCOMM
[INFO][OCL INFO] CL_DEVICE_VERSION      : OpenCL 2.0 Adreno(TM) 610
[INFO][OCL INFO] CL_DEVICE_OPENCL_C_VERSION     : OpenCL C 2.0 Adreno(TM) 610
[INFO][OCL INFO] CL_DEVICE_PROFILE      : FULL_PROFILE
[INFO][OCL INFO] CL_DRIVER_VERSION      : OpenCL 2.0 QUALCOMM build: commit #03e27f8 changeid #I326e6aff90 Date: 11/02/20 Mon Local Branch: mybrancheb1d781c-1a78-f1f4-8c78-ac1f6bcc2cee Remote Branch: quic/gfx-adreno.lnx.1.0.r116-rel Compiler E031.37.12.02

[INFO][OCL INFO] OPENCL DEVICE PERFORMANCE INFO:
[INFO][OCL INFO] DEVICE ADDRESS BITS (64) bits
[INFO][OCL INFO] DEVICE MAX CLOCK FREQUENCY (1) MHz
[INFO][OCL INFO] DEVICE MAX COMPUTE UNITS (1) IN ONE DEVICE
于 2020-12-18T09:36:28.873 回答