m4rs-mt / ILGPU

ILGPU JIT Compiler for high-performance .Net GPU programs
http://www.ilgpu.net
Other
1.38k stars 117 forks source link

Intel GPUs ,float64 type is not supported on this device #1089

Closed sunxiaotianmg closed 1 year ago

sunxiaotianmg commented 1 year ago

image image

sunxiaotianmg commented 1 year ago

How to handle this situation

sunxiaotianmg commented 1 year ago

float instead of all double type ?

sunxiaotianmg commented 1 year ago

ILGPU will query the OpenCL driver about supported functionality. In this case, OpenCL has reported that the Intel GPU does not support 64-bit floating point operations. You will either need to stop using double, or you could potentially use the 32-bit only mode, and ILGPU will convert double to float as necesary (https://ilgpu.net/docs/03-advanced/04-math-functions/)

sunxiaotianmg commented 1 year ago

It seems that the problem can only be solved by using float and Math (MathMode. Fast32BitOnly) together

sunxiaotianmg commented 1 year ago

float instead of all double type,In this MathMode. Fast32BitOnly, the correct results can be obtained