Migrate implementations of triu and tril to a separate file (#28750)
Summary:
Having them in BatchLinearAlgebra.cpp/.cu seemed out of place, since they are more general purpose and this code was interspersed between LAPACK and MAGMA wrappers as well.
Changelog:
- Move tril* / triu* to TriangularOps.cpp/.cu
Pull Request resolved: https://github.com/pytorch/pytorch/pull/28750
Test Plan:
- Builds should complete successfully to ensure that the migration is error-free
- Tests should pass to ensure the methods that the front-end is unaffected.
Differential Revision: D18205456
Pulled By: soumith
fbshipit-source-id: 41966b9ddfe9f196f4d7c6a5e466782c1985d3d9