Add device() method to c10::Event (#57293)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/57293
It's just a nice convenience.
ghstack-source-id: 127916265
Test Plan: It builds
Reviewed By: mrshenli
Differential Revision: D28092731
fbshipit-source-id: 99c8c33fd6e245915f2ed0c0482de132d7c75bf5