create tensor based on provided datatype (#22468)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/22468
as title
Reviewed By: ajauhri
Differential Revision: D15744503
fbshipit-source-id: 050b32dd7f135512385fc04f098c376c664211a9