Expose get_active_ddp_module api for torchdynamo DDP (#83333)
Pairs up with torchdynamo PR https://github.com/pytorch/torchdynamo/pull/628
Exposes a new API that lets torchdynamo know when it is compiling the 'forward' of a module that is inside a DDPmodule.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/83333
Approved by: https://github.com/mrshenli