Adding scalar to the c10 registration type check
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/32886
Test Plan: Imported from OSS
Differential Revision: D19673484
Pulled By: z-a-f
fbshipit-source-id: ea8478a4fe6788dcb044ec1ab7d51dc50ab3fa60