Thanks again @colesbury.
So _share_cuda_() gives me access to the cudaIpcMemHandle_t of an existing torch.cuda.Tensor.  It’s unfortunate that the handle is not exposed through a regular function call, but it’s a good start.
Now, what about when I need to convert the other way around, from handle to tensor?  If I have a cudaIpcMemHandle_t, read in from shared memory and converted to a Python byte string, can I insert that into a torch.cuda.Storage and thereby produce a torch.cuda.Tensor which points to the appropriate data from GPU memory?
Also, can you explain the offset a bit more?  It sounds like multiple different torch.cuda.Storage objects share the same cudaIpcMemHandle_t, but with different offsets in memory.  Is that correct?  I don’t see that as a major problem.  I’ll just have to write the offset to shared memory as well.
Another idea altogether:  What about using Pytorch’s extension-ffi to access the cudaIpcMemHandle_t and storing the data into a THCudaTensor?  I’ve never played with the extension-ffi before, so I don’t really understand it’s capabilities.  I’ll need to make calls to  functions like cudaIpcOpenMemHandle, which are part of CUDAs runtime API.  Is this possible?