pub struct ParkedGraph<T = Forward> { /* private fields */ }Expand description
A parked cuGraph graph that can be moved across Rust threads.
Graph<T> itself remains !Send/!Sync because native cuGraph operations
require a thread-local entered execution context. ParkedGraph<T> is the
transfer state for an idle graph: it owns the native graph pointer, retains
runtime-bound handle leases needed for teardown, and carries a CUDA event
recorded after tracked work on the parking binding’s stream, plus that
binding’s identity. Exact resume requires an
entered context for the binding that parked the graph;
resume_under executes under a different
same-device binding after ordering it behind the park event.
Implementations§
Source§impl<T> ParkedGraph<T>
impl<T> ParkedGraph<T>
Sourcepub fn properties(&self) -> GraphProperties
pub fn properties(&self) -> GraphProperties
Structural properties declared when this graph was constructed.
Sourcepub fn vertex_dtype(&self) -> DataType
pub fn vertex_dtype(&self) -> DataType
The data type of vertex IDs in this graph.
Sourcepub fn weight_dtype(&self) -> DataType
pub fn weight_dtype(&self) -> DataType
The data type of edge weights in this graph.
Sourcepub fn resume(self, handle: &EnteredContext<'_>) -> Result<Graph<T>>
pub fn resume(self, handle: &EnteredContext<'_>) -> Result<Graph<T>>
Resume this parked graph under a runtime-bound entered context.
Resume is exact-binding by construction: handle must use the cudf
runtime stream/MR binding that parked the graph. The runtime stream
waits on the park event before the live Graph is returned to the
caller. Retained creation leases stay untouched for teardown; use
resume_under to execute under a
different same-device binding.
If this method returns an error, the consumed parked graph is dropped.
Sourcepub fn resume_under(self, handle: &EnteredContext<'_>) -> Result<Graph<T>>
pub fn resume_under(self, handle: &EnteredContext<'_>) -> Result<Graph<T>>
Resume this parked graph under a different runtime-bound execution binding on the same device (storage/execution split).
The resume stream waits on the park event, ordering preceding storage
writes before borrower kernels read the graph. Algorithm temporaries
allocate through the entering handle, charging workspace, auxiliary
streams, and outputs to the borrower domain. cuGraph algorithms observe the
graph through a const view: the borrower must not mutate shared
storage, and the exclusive checkout guard that owns this parked graph
must outlive every kernel launched under the borrower binding.
Teardown still runs under the retained creation leases. Re-park with
park_under under the same borrower binding.
If this method returns an error, the consumed parked graph is dropped.