Hi, I am seeing a strange behavior related to tensor unpacking and leaf variables being used for in-place ops. Please see my minimal reproducible example below. I would have thought that make_xy_v1 and make_xy_v2 are equivalent creation patterns, but they are giving rise to different behavior. Can someone explain why these are different? My torch.__version__ is ‘1.0.1.post2’, installed via conda. I am running Ubuntu 16.04. Thanks!
import torch

def make_xy_v1(N):
    x = torch.zeros((N,))
    y = torch.zeros((N,))
    return x, y

def make_xy_v2(N):
    x, y = torch.zeros((2, N))
    return x, y

def demo(make_xy_fn):
    x, y = make_xy_fn(N=5)
    
    inds = [0]
    vals = torch.tensor((1.,), requires_grad=True)

    x[inds] = vals
    y[inds] = vals

demo(make_xy_v1)
">>> Executes fine."

demo(make_xy_v2)
">>> RuntimeError: a leaf Variable that requires grad has been used in an in-place operation."

Note: If I cast inds to tuple, it seems to trigger a different indexing strategy and no error is thrown.