Add __all__ definition in torch.profiler to fix Pylance type check er… (#78553)
- Declare __all__ to make sure all the import is marked as public, so Pylance won't complain.
- Import modules directly from torch._C._autograd to suppress Pylance warnings.
Fixes #76652
Pull Request resolved: https://github.com/pytorch/pytorch/pull/78553
Approved by: https://github.com/albanD, https://github.com/robieta