Closed maleadt closed 1 year ago
Strange. This was merged into master, but I still get the same error:
ERROR: GPU broadcast resulted in non-concrete element type Union{Missing, Float64}. This probably means that the function you are broadcasting contains an error or type instability.
Then you're not using GPUArrays#master. Check st -m
in the Pkg REPL.
... I see. The dependence of CUDA.jl
has not yet changed. If I download and install GPUArrays.jl
it works.
Yeah, that's normal. You don't automatically get commits from master branches until a version has been released, or unless you specifically request those changes. Would you expect otherwise?
;-) No. But then I did not really notice that this change was not a change to the master of CUDA.jl
repo when I posted my first comment.
We are currently checking for
isconcretetype
, which is too limiting, as e.g. CUDA.jl supports isbits-union arrays. Checking forallocatedinline
would be better, but let's just do away with the check entirely and have the array constructor fail in the presence of unsupported element types. This is better anyway, as some back-ends may not support isbits-unions.We do however still check for Union{}, as that isn't allocated inline so would fail array construction. By using Nothing there instead, we give the GPU kernel (which is expected to throw an error) the chance to execute and report an exeception dynamically. This also makes it possible to trace a broadcast invocation under, e.g., Cthulhu.