Port triangular_solve to structured kernel (#61857)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/61857
A few updates to internal code that allow marking triangular_solve as structured.
cc jianyuh nikitaved pearu mruberry walterddr IvanYashchuk xwang233
Test Plan: Imported from OSS
Reviewed By: albanD
Differential Revision: D31928687
Pulled By: cpuhrsch
fbshipit-source-id: 80a2783c469d5a6194c466ccfa8808fa41c0bdb7