derivatives.yaml cleanup + restore codegen code forgotten in refactor (#51721)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/51721
Reviewed By: zhangguanheng66
Differential Revision: D26285908
Pulled By: albanD
fbshipit-source-id: 3130736be9146eaee3a8e80be59a66eb2180d536