我正在尝试从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时钟频率。
答案 0 :(得分: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