Revert "Revert "[LT] Store OpKind for each IR subclass in a static field""
Summary: Re-land https://github.com/pytorch/pytorch/pull/76711 by
fixing internal build errors.
Generate class-level opkind as a static method instead of a static
member.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/77102
Approved by: https://github.com/wconstab, https://github.com/JackCaoG, https://github.com/antoniojkim