Thanks for reply.  torch.cuda.synchronize accepts a  device  argument. However, I co-run multi-tasking on the same single GPU, the device will be only one. I am not sure if I can use torch.cuda.synchronize under co-running condition.
For event object,  it seems that torch.cuda.Event.synchronize() does not works here.
with torch.no_grad():
    	starter, ender = torch.cuda.Event(enable_timing=True), torch.cuda.Event(enable_timing=True)
        starter.record()      
        output = model(input_batch)
        ender.record()    
        torch.cuda.synchronize()
        curr_time = starter.elapsed_time(ender)