Allow torch.tril / triu to handle bool and half inputs (#24163)
Summary:
Changelog:
- Enable torch.tril / triu for bool and float16 dtypes
Pull Request resolved: https://github.com/pytorch/pytorch/pull/24163
Test Plan:
- Tests added in test_torch.py for all devices and dtypes (except bfloat16)
Fixes https://github.com/pytorch/pytorch/issues/24035
Differential Revision: D16793315
Pulled By: ezyang
fbshipit-source-id: 2bbc51ce567405a7cb2d8ab567eee6c2e40aa76a