()
| 141 | |
| 142 | # Performs the computing in a background stream |
| 143 | def perform_computing(): |
| 144 | with torch.cuda.stream(stream): |
| 145 | g2 = g.to(F.ctx()) |
| 146 | torch.cuda.current_stream().wait_stream(stream) |
| 147 | g2.record_stream(torch.cuda.current_stream()) |
| 148 | torch.cuda._sleep(int(50 * cycles_per_ms)) # delay the computing |
| 149 | results2.copy_(OPS.copy_u_sum(g2, x)) |
| 150 | |
| 151 | perform_computing() |
| 152 | with torch.cuda.stream(stream): |
no test coverage detected