So ended-up doing this… (but sure there is better solution)
with torch.cuda.device(d1):
    torch.cuda.profiler.cudart().cudaProfilerStart()
with torch.cuda.device(d0):
    torch.cuda.profiler.cudart().cudaProfilerStart()

x0 + 1
x1 + 1

with torch.cuda.device(d1):
    torch.cuda.profiler.cudart().cudaProfilerStop()
with torch.cuda.device(d0):
    torch.cuda.profiler.cudart().cudaProfilerStop()