[FSDP] Make recursive_wrap, wrap APIs independent of ConfigAutoWrap. (#68776)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/68776
Makes these APIs independent of ConfigAutoWrap so that they can be
used by FSDP ctor without it knowing about ConfigAutoWrap.
Also gets us one step closer to killing ConfigAutoWrap.recursive_wrap and
auto_wrap(), as we will only support enable_wrap() and wrap() moving forward.
Will test via unittests and FSDP benchmarks to ensure the wrapping still works.
ghstack-source-id: 144807948
Test Plan: CI
Reviewed By: zhaojuanmao
Differential Revision: D32604021
fbshipit-source-id: 54defc0cd90b16b5185a8c1294b39f75c06ffd21