I’m not sure if I understand the issue correctly, but recreating a tensor or parameter will detach it from the computation graph as seen in the original issue.
If you have already created the parameters, you would have to construct the matrix with cat or stack operations.
Could you post a small code snippet to see your workflow in case I misunderstood your question?