Expose some functions out of ENABLE_FLATBUFFER.
Summary: Because they don't depend on flatbuffer
Test Plan: existing unittests
Differential Revision: D35291748
Pull Request resolved: https://github.com/pytorch/pytorch/pull/75700
Approved by: https://github.com/iseeyuan