MCPcopy
hub / github.com/dmlc/dgl / perform_computing

Function perform_computing

tests/python/pytorch/test_ffi-stream.py:143–149  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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):

Calls 3

toMethod · 0.45
ctxMethod · 0.45
record_streamMethod · 0.45

Tested by

no test coverage detected