[PyTorch] Only select root ops in codegen unboxing (#74663)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/74663
In lightweight dispatch, we only need to register root ops. Unlike in the dispatcher world, the transitive closure of the operators doesn't need to go through dispatcher or op registry.
Test Plan: Rely on unit tests
Reviewed By: priyaramani
Differential Revision: D35104401
fbshipit-source-id: 1a2df571880ac3c8625985c01bd89a2bb9566af9
(cherry picked from commit 16207fa18e87908ec5e038a7f60f41893a236749)