Handle log_sigmoid(out=) properly. (#36736)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/36736
Fixes: https://github.com/pytorch/pytorch/issues/36499
Changes:
1) Moves some bindings from LegacyNNDefinitions to Activation so all of log_sigmoid lives together
2) Properly handle non-contiguous / incorrectly sized out parameters to log_sigmoid. This is done by copying from a buffer if necessary.
3) Require that the internal buffer (different from 2)) is contiguous. This should always be the case because it's always created internally.
4) Adds a test
Test Plan: Imported from OSS
Differential Revision: D21070934
Pulled By: gchanan
fbshipit-source-id: 94577313c32d1ef04d65c1d6657598304a39fe6e