torch.cuda.synchronize accepts a device argument as seen in the docs. Also the Event object provides a synchronize() method in case you want to use it.
PS: you can post code snippets by wrapping them into three backticks ```, which makes debugging easier.