You didn’t mention wrapping that struct in an array as well. That’s currently not supported by CuArray
. You can work around it by eagerly converting the CuArray
s to CuDeviceArray
(which are isbits
) using cudaconvert
and storing those in a CuArray
, see e.g. Passing array of pointers to CUDA kernel. But to cudaconvert
your TestType
here you’ll need to make it parametric (a::T
, b::T
, T<:AbstractArray
) and add Adapt.jl rules (Adapt.adapt_structure(to, x::TestType) = TestType(adapt(to, x,a), ...)
), as I mentioned above.
3 Likes