Everything works after modifying my tensorFromBlob code from:
at::Tensor cuda_tensor_from_shm = at::CUDA(at::kFloat).tensorFromBlob(d_img, {rows,cols});
to:
at::Tensor cuda_tensor_from_shm = torch::CUDA(at::kFloat).tensorFromBlob(d_img, {rows,cols});
I’ll need to dig into the code to understand why torch::CUDA is the correct scoping, but anyway it works.