[FEATURE]libtorch interface
At this moment, CudaBuffer can be converted to torch.Tensor through __cuda_array_interface__. However, sometimes we have to use libtorch(at::Tensor/torch::Tensor). Is it possible to make a libtorch interface for nvcv::Tensor/ITensor ?
To have DLPack support for C++ API would be great, like
DLManagedTensor* fromNvcvTensor(const nvcv::Tensor& src) ;
...
An example is from pytorch:
https://github.com/Tabrizian/pytorch/blob/5c5f53ef6645016794b2e0c9a267ccb095995ea5/aten/src/ATen/DLConvertor.cpp#L244
At this moment, CudaBuffer can be converted to torch.Tensor through
__cuda_array_interface__. However, sometimes we have to use libtorch(at::Tensor/torch::Tensor). Is it possible to make a libtorch interface for nvcv::Tensor/ITensor ?
I'm having the same problem now, how did you solve it? Thanks!
At this moment, CudaBuffer can be converted to torch.Tensor through
__cuda_array_interface__. However, sometimes we have to use libtorch(at::Tensor/torch::Tensor). Is it possible to make a libtorch interface for nvcv::Tensor/ITensor ?I'm having the same problem now, how did you solve it? Thanks!
I wrote a libtorch interface here toNvcvTensor and fromNvcvTensor , for Tensor2NvTensor and NvTensor2Tensor backends
@dlesage-nvidia @pmikolajczyk