Snapdragon 820 Adreno 530 does not return correct device information

I am trying to get CL_DEVICE_MAX_COMPUTE_UNITS and CL_DEVICE_MAX_CLOCK_FREQUENCY device information with an Adreno 530 GPU on a Snapdragon 820 device (Samsung Galaxy S7). But I get 4 for CL_DEVICE_MAX_COMPUTE_UNITS and 1 for CL_DEVICE_MAX_CLOCK_FREQUENCY. This seems wrong because CL_DEVICE_MAX_CLOCK_FREQUENCY = 1 means 1 MHz. Below is my code to extract this information:

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);

Note: the device is of type cl :: Device.

For Mac, it seems to work correctly. I get 40 compute units and a 1200 MHz clock speed for Intel Iris Pro.

+4
source share

Source: https://habr.com/ru/post/1691526/


All Articles