Fix aten op output assignment (#18581)
Summary:
Fixes the problem of #18391
The issue is that when we code gen the ATenOp, we always generated static number of outputs for each operator. E.g. If there's operator from a old model that only requires two outputs, in its createOperator it will only allocate two output blobs, while the newer version of the operator (`unique` in this case) requires more output blob to be allocated.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/18581
Differential Revision: D14865647
Pulled By: wanchaol
fbshipit-source-id: 85f63fe16d6fe408a09eca84798c7e8cab3070e9