Add interpolate-style overloads to aten::upsample* ops (#37176)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/37176
The non-deprecated user-facing interface to these ops (F.interpolate)
has a good interface: output size and scale are both specified as
a scalar or list, and exactly one must be present. These aten ops
have an older, clunkier interface where output size is required and
scales are specified as separate optional scalars per dimension.
This change adds new overloads to the aten ops that match the interface
of interpolate. The plan is to eventually remove the old overloads,
resulting in roughly net-zero code added. I also believe it is possible
to push this interface down further, eliminating multiple optional<double>
arguments, and simplifying the implementations.
The rollout plan is to land this, wait for a reasonable interval for
forwards-compatibility (maybe 1 week?), land the change that updates
interpolate to call these overloads, wait for a reasonable interval
for backwards-compatibility (maybe 6 months?), then remove the old
overloads.
This diff does not add the `.out` variants of the ops because they
are not currently accessible through any user-facing API.
ghstack-source-id: 106938113
Test Plan:
test_nn covers these ops fairly well, so that should prevent this diff
from breaking anything on its own.
test_nn on the next diff in the stack actually uses these new overloads,
so that should validate that they are actually correct.
Differential Revision: D21209989
fbshipit-source-id: 2b74d230401f071364eb05e138cdaa55279cfe91