Aloow Union of scalars to be NumberType (#66591)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/66591
Test Plan: Imported from OSS
Reviewed By: gmagogsfm
Differential Revision: D31632599
Pulled By: tugsbayasgalan
fbshipit-source-id: 374065da1d91334a19c15c604faf13ebec1681f6