Is it an idea to add a check to the generated opencl whether a device supports the minimum required opencl version?
I have two OpenCL versions installed on my system, one is provided by mesa and only supports up to OpenCL 1.1, while the other one, which i ripped from amdgpu-pro, does support 1.2
unfortunately the mesa one appears first and i sometimes forget to pass -d. I know its not much to type that, but i think its appropriate if the generated code also checks for it and skips any incompatible devices.
(i set up a build environment for futhark the other day so i'm fine with contributing this myself, but i just want to know if this would be an appropriate thing to add)
Futhark doesn't require more than 1.1, I think. Mesa is probably defective for other reasons. I've certainly never managed to get it to work.
Since Mesa might work for some people and in some future, I don't like the idea of blacklisting it. Presumably people who install the Mesa ICD also do it for a reason. The only thing we blacklist is Apple's CPU device, because it is completely dysfunctional, and users cannot get rid of it.
Ah. In that case it might be something else: when i run under mesa, it complains that cl_khr_fp64 is not enabled for the f64 intrinsic functions.
Oh. Yes. Probably Mesa does not support double precision. Futhark does have code that tries to only include the double precision parts of the runtime system when the program needs it, but I'm not sure we test that code path anymore.