Passing tuple of structs to a CUDA.jl kernel

Why do you assume it’s not supported? There’s many reasons code may not compile, most typically caused by user error. Did you try the suggestion on how to debug that’s part of the error message?

EDIT: Upon actual inspection of your code (but still, next time please try the suggestion as recommended by the error…), there’s an inherent instability in your code: indexing t may result in two differently-typed versions of MyStruct, and that kind of instability is not supported on the GPU. You can simply spot the instability using code_warntype(getindex, Tuple{typeof(t), Int}).

2 Likes