[profiler][resend] Add cuda memory and distributed metadata (#58010)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/58010
Resending https://github.com/pytorch/pytorch/pull/57252
Test Plan: CI
Reviewed By: gdankel
Differential Revision: D28345161
Pulled By: ilia-cher
fbshipit-source-id: 18be07b275403205f5b5487ae3589bd39a8eac96