Closed ToucheSir closed 1 year ago
We won't be able to handle Core.Box
it's semantics are incompatible with GPU execution.
Certainly. For context, this is for pure host-side functions like Flux.{cpu,gpu,f32,f64}
, which use Adapt under the hood.
Please test https://github.com/JuliaGPU/Adapt.jl/pull/58
Sorry, didn't get a chance to test #58 until today but it looks good! Also learned quite a bit about function type representation from reading the code :)
Originally found in https://discourse.julialang.org/t/my-model-cant-be-transfered-to-gpu-adapt-jl-problem/92585/11. Copying over the MWE from that thread:
I imagine the logic in https://github.com/JuliaGPU/Adapt.jl/blob/v3.4.0/src/base.jl#L13-L21 needs to be adapted to handle
nfields(f) > npar
.