[pytorch] Support output types that are non tensors (#120804)
Summary:
per title
This is needed because some modules return None and non tensors as output
Test Plan: sandcastle?
Reviewed By: zhxchen17
Differential Revision: D54311609
Pull Request resolved: https://github.com/pytorch/pytorch/pull/120804
Approved by: https://github.com/zhxchen17