I want to do some computation on tensors which I cannot do with PyTorch without copying memory to the cpu. For this, I want to use scikit-cuda which in turn relies on pyCUDA. pyCUDA has a GPUArray class which I somehow need to instantiate from the memory occupied by a tensor. So far I’ve only found the _cdata field in tensors or Storage classes. This appears to return some kind of address.
What is the exact nature of this address? Is it a contiguous block of memory and could it be used to treat it as a different data type?