[profiler] Add cuda synchronization point (ci-all) (#57036)
Summary:
Adding cuda synchronization when exiting the profiler
context manager
Pull Request resolved: https://github.com/pytorch/pytorch/pull/57036
Test Plan: CI
Reviewed By: xuzhao9
Differential Revision: D28040552
Pulled By: ilia-cher
fbshipit-source-id: 944c46a58f4c2b6d1a1c64c8d4012d662d0262d0