Hi,
No we don’t have this feature.
What I meant is what this feature does is just keep a list of both Tensors and adapting the few ops you will need to do on them.
A quick example below:
import torch

class MySharedTensor(object):
    def __init__(self, tensors, dim=None):
        assert dim is not None
        self.dim = dim
        assert (isinstance(tensors, list))
        assert (torch.is_tensor(t) for t in tensors)
        self.tensors = tensors
        self.dim_sizes = [t.size(self.dim) for t in self.tensors]

    # If you want to recover a single Tensor from it
    def to_full_tensor(self):
        return torch.cat(self.tensors, dim=self.dim)

    # Out of place addition
    def __add__(self, other):
        assert torch.is_tensor(other)
        out = other.clone()
        curr_idx = 0
        for i, t in enumerate(self.tensors):
            other_slice = other.narrow(self.dim, curr_idx, self.dim_sizes[i])
            out.narrow(self.dim, curr_idx, self.dim_sizes[i]).copy_(t).add_(other_slice)
            curr_idx += self.dim_sizes[i]
        return out

    # Inplace add
    def __iadd__(self, other):
        assert torch.is_tensor(other)
        curr_idx = 0
        for i, t in enumerate(self.tensors):
            other_slice = other.narrow(self.dim, curr_idx, self.dim_sizes[i])
            t.add_(other_slice)
            curr_idx += self.dim_sizes[i]
        return self

    # Matrix Multiplication (only 2d matrices for simplicity)
    def mm(self, other):
        assert other.ndimension() == 2
        assert all(t.ndimension() == 2 for t in self.tensors)

        if self.dim == 0:
            out_tensors = []
            for t in self.tensors:
                out_tensors.append(t.mm(other))
            return MySharedTensor(out_tensors, dim=0)
        elif self.dim == 1:
            out = 0
            curr_idx = 0
            for i, t in enumerate(self.tensors):
                other_slice = other.narrow(0, curr_idx, self.dim_sizes[i])
                out += t.mm(other_slice)
                curr_idx += self.dim_sizes[i]
            return out
        else:
            raise RuntimeError("Invalid dimension")


a = torch.rand(2, 4)
b = torch.rand(2, 4)
print("a and b")
print(a)
print(b)

c = MySharedTensor([a, b], dim=1)
print("c size:")
print(c.to_full_tensor().size())

d = torch.rand(2, 8)
print("d")
print(d)

e = c + d
print("e = c + d")
print(e)

f = c.to_full_tensor() + d
print("f = c.to_full_tensor() + d")
print(f)

c += d
print("c += d")
print(c.to_full_tensor())
print("a and b are changed:")
print(a, b)


g = torch.rand(8, 3)
print("g")
print(g)

h = c.mm(g)
print("h = c.mm(g)")
print(h)

k = c.to_full_tensor().mm(g)
print("k = c.to_full_tensor().mm(g)")
print(k)