[ROCm] Fix the flaky test test_stream_event_nogil (#53850)
Summary:
Fix the flaky test in https://github.com/pytorch/pytorch/issues/53192 properly.
Signed-off-by: Jagadish Krishnamoorthy <jagdish.krishna@gmail.com>
Pull Request resolved: https://github.com/pytorch/pytorch/pull/53850
Reviewed By: albanD
Differential Revision: D26993582
Pulled By: malfet
fbshipit-source-id: b0aefb188a236a5e94ee31a30ede7e8175443ff5