Hi,
The pytorch Tensor will require a contiguous chunk of memory. But you can specify size and stride so it does not have to be stored in a conitguous way in that contiguous chunk of memory.
You have some information in the cpp extension doc here 13 or in the cpp API doc here 4.
But the simplest solution is most likely going to be to create a Tensor of the right size and then copy your content into it.