Added functionality for all to take Lists as input (#34582)
Summary:
New pull request after rebase error in pull request https://github.com/pytorch/pytorch/issues/33923
Pull Request resolved: https://github.com/pytorch/pytorch/pull/34582
Differential Revision: D20447689
Pulled By: eellison
fbshipit-source-id: 4296b64185eccb136b1b614b532deb3af20c7544