move generate-code into shared build structure (#75699)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/75699
ghstack-source-id: 155255334
Test Plan: Rely on CI.
Reviewed By: dreiss
Differential Revision: D35587412
fbshipit-source-id: 5ab79c07029de279a1fae36519654a73bb61d430
(cherry picked from commit 4896b72a6c0cc087e36889d21d2d885009d94a6d)