Handle stack correctly (#16246)
authorSebastian Messmer <messmer@fb.com>
Mon, 28 Jan 2019 19:36:30 +0000 (11:36 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Mon, 28 Jan 2019 19:46:03 +0000 (11:46 -0800)
commit80f4374dde4342625b22a4f415bfb92fdc1290d2
treed035c0e83434b13ab7bb2b03781cad82447d7f46
parentc7547dbd5eeed5fd24ec96dfc64d5ae98cdcb7c2
Handle stack correctly (#16246)

Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/16246

The op schema says it returns multiple values, so let's actually return multiple values instead of one tuple.
For some reason, this did work when called from python (probably some auto-unpacking),
but once called from JIT, it segfaulted. This diff fixes that.

Reviewed By: dzhulgakov

Differential Revision: D13780147

fbshipit-source-id: fe94f82f4c53b7454f77c4484fca4ac9dc444475
caffe2/python/operator_test/layer_norm_op_test.py
torch/csrc/jit/c10_ops/layer_norm.cpp