Fix return type Any for Ternary ops (#49165)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/49165
Test Plan: Imported from OSS
Reviewed By: eellison
Differential Revision: D25463694
Pulled By: ejguan
fbshipit-source-id: 5cf907e8de6eeb0171d61175a60fac9812b76c6c