graph
- class torch.xpu.graph(xpu_graph, pool=None, stream=None)
Context-manager that captures XPU work into a
torch.xpu.XPUGraphobject for later replay.
Context-manager that captures XPU work into a torch.xpu.XPUGraph object for later replay.
xpu_graph (torch.xpu.XPUGraph) – Graph object used for capture.
pool (optional) – Opaque token (returned by a call to graph_pool_handle() or
other_Graph_instance.pool()) hinting this graph’s capture
may share memory from the specified pool.
stream (torch.xpu.Stream, optional) – If supplied, will be set as the current stream in the context.
If not supplied, graph sets its own internal side stream as the current stream in the context.