Move bytecode generation to python (#71681)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/71681
Test Plan: Imported from OSS
Reviewed By: gmagogsfm, cccclai
Differential Revision: D33730791
Pulled By: tugsbayasgalan
fbshipit-source-id: e752e9ae20c01a57a3bea270f604215fdcc9182e
(cherry picked from commit 69c9dc0548d794a6b3be8e1f9967e5fd56310a29)