Forum Discussion
MuhammadAr_U_Intel
Contributor
6 years agoYou may also want to try the workaround suggested for a similar issue on Windows.
https://www.intel.com/content/www/us/en/programmable/documentation/ewa1412772636144.html#ewa1412773000284
Issue Details:
For Windows, when the host application queries the number of devices, calls to clGetDeviceIDs return 128 devices regardless of the actual number of devices present.
Note: You can find the actual available devices at the beginning of the device list returned by clGetDeviceIDs.
This issue affects the Intel® Arria® 10 GX FPGA Development Kit Reference Platform and the Intel® Stratix® 10 GX FPGA Development Kit Reference Platform.
Workaround:
Perform one of the following workarounds:
Rewrite the host application to limit the query for clGetDeviceIDs to the actual number of devices.
Rewrite the host application to use clGetDeviceInfo to query which devices are available. Calling clGetDeviceInfo with the CL_DEVICE_AVAILABLE flag correctly reports that extraneous devices are unavailable.
Rewrite the host application to only call clCreateContext with the actual number of devices. Calling clCreateContext with extraneous devices will fail with the error CL_DEVICE_NOT_AVAILABLE.
Set the environment variable CL_OVERRIDE_NUM_DEVICES_INTELFPGA to the correct number of devices. Doing so fixes the erroneous behavior of clGetDeviceIDs.
Thanks,
Arslan