pub struct GraphExec { /* private fields */ }Expand description
An instantiated, executable graph.
Created by Graph::instantiate, a GraphExec holds a snapshot of
the graph and a pre-computed execution order. On systems with a real
CUDA driver, launching a GraphExec would call cuGraphLaunch.
On macOS (or any system without CUDA), launching returns
CudaError::NotInitialized because the driver is not available.
Implementations§
Source§impl GraphExec
impl GraphExec
Sourcepub fn launch(&self, _stream: &Stream) -> CudaResult<()>
pub fn launch(&self, _stream: &Stream) -> CudaResult<()>
Launches the executable graph on the given stream.
On a real GPU, this would call cuGraphLaunch(hGraphExec, hStream),
which submits the entire graph to the stream with minimal CPU
overhead.
§Errors
Returns CudaError::NotInitialized if the CUDA driver is not
available (e.g. on macOS).
Sourcepub fn execution_order(&self) -> &[usize]
pub fn execution_order(&self) -> &[usize]
Returns the pre-computed execution order (topological sort).
Sourcepub fn node_count(&self) -> usize
pub fn node_count(&self) -> usize
Returns the total number of nodes that would be executed.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GraphExec
impl RefUnwindSafe for GraphExec
impl Send for GraphExec
impl Sync for GraphExec
impl Unpin for GraphExec
impl UnsafeUnpin for GraphExec
impl UnwindSafe for GraphExec
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more