change pt_defs.bzl to python file (#42725)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/42725
This diff changes pt_defs.bzl to pt_defs.py, so that it can be included as python source file.
The reason is if we remove base ops, pt_defs.bzl becomes too big (8k lines) and we cannot pass its content to gen_oplist (python library). The easy solution is to change it to a python source file so that it can be used in gen_oplist.
Test Plan: sandcastle
Reviewed By: ljk53, iseeyuan
Differential Revision: D22968258
fbshipit-source-id: d720fe2e684d9a2bf5bd6115b6e6f9b812473f12