Thank you, but it seems to have no effect in terms of performance, right?
Moreover, I have to prefer the dirty way (saving tensors as ctx attributes), because I am going to attach some information to these tensors in backward, so I need the original tensors, not copies. Like that:
@staticmethod
def backward(ctx, grad_out):
    x, weight, bias = ctx.x, ctx.weight, ctx.bias
    weight.some_info = get_info()
    return grad_out @ weight, grad_out.t() @ x, grad_out.sum(dim=0)

m = MyLinear(...)
...
loss.backward()
print(m.weight.some_info)

If there are any better ways to achieve the same, I would be glad to know.