Add test to torch.jit.export_opnames, make the _C function private
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/31446
Test Plan: Imported from OSS
Differential Revision: D19172851
Pulled By: iseeyuan
fbshipit-source-id: f06d8766ed73c9abe4ebf41c402ee64880d745be