Removed hip call hipDeviceSynchronize (#97209)
Similar to CUDA, fixed test_profiler_tree.py::TestProfilerTree unit test suites by DeviceSynchronize call removal.
@jithunnair-amd @pruthvistony
Pull Request resolved: https://github.com/pytorch/pytorch/pull/97209
Approved by: https://github.com/kit1980, https://github.com/jithunnair-amd