Support torch::tensor and at::tensor with bool and BFloat16 dtypes.
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/23337
Test Plan: Imported from OSS
Differential Revision: D16467979
Pulled By: gchanan
fbshipit-source-id: 2e6ad431c47a61c917d501390d14c55b788958ab