Convert native CUDA data containers to `torch::Tensor`

Hi. Is there any official way to convert directly an array of native CUDA containers like float3 to a torch::Tensor? If not, is there any efficient way to to it? Thanks!

You should be able to create a tensor via torch::from_blob with kCUDA as the optional argument.

1 Like