0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-05-18 10:53:48 +02:00

ircd:🆑 Suppress CL_DEVICE_NOT_FOUND rather than throw on init.

This commit is contained in:
Jason Volk 2022-08-27 13:33:27 -07:00
parent 239f2fe17c
commit f1da346a1f

View file

@ -359,7 +359,9 @@ ircd::cl::init::init_devices()
CL_DEVICE_TYPE_GPU | CL_DEVICE_TYPE_ACCELERATOR
};
call(clGetDeviceIDs, platform[i], type, DEVICE_MAX, device[i], devices + i);
// OpenCL sez 0 devices throws an error but we log a warning for now.
constexpr auto ignore(CL_DEVICE_NOT_FOUND);
call<ignore>(clGetDeviceIDs, platform[i], type, DEVICE_MAX, device[i], devices + i);
devices_total += devices[i];
}