refactor register_prim_ops (#21001)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/21001
ghimport-source-id: f1b8e3999bf18fb0f3b857a13c3e3f609e1e4b4e
Differential Revision: D15523445
Pulled By: wanchaol
fbshipit-source-id: c1e29b0985bde580703a1fca9df46da773826df6