Hi,
I’m trying to pass an object with a wrapped CuArray to a kernel:
import CUDA
struct MyStruct
arrayField::CUDA.CuArray{Float32, 1, Nothing}
end
function f!(obj::MyStruct)
id = CUDA.threadIdx().x
if id <= length(a)
obj.arrayField[id] = id
end
nothing
end
myObj = MyStruct(CUDA.fill(0.0, 5))
CUDA.@cuda threads = length(myObj) f!(myObj)
This fails with error message
GPU compilation of kernel f!(MyStruct) failed
KernelError: recursion is currently not supported
Is this a bug or am I doing something wrong?
Thanks