pub struct CrossGpuK2KRouter { /* private fields */ }Expand description
Routes K2K messages across GPU boundaries.
Implementations§
Source§impl CrossGpuK2KRouter
impl CrossGpuK2KRouter
Sourcepub fn new(coordinator: Arc<MultiGpuCoordinator>) -> Arc<Self>
pub fn new(coordinator: Arc<MultiGpuCoordinator>) -> Arc<Self>
Create a new cross-GPU K2K router.
Sourcepub fn route_message(
&self,
source_kernel: &KernelId,
dest_kernel: &KernelId,
message: K2KMessage,
) -> Result<RoutingDecision>
pub fn route_message( &self, source_kernel: &KernelId, dest_kernel: &KernelId, message: K2KMessage, ) -> Result<RoutingDecision>
Route a message from source kernel to destination kernel.
Sourcepub fn drain_pending(
&self,
source: usize,
dest: usize,
) -> Vec<PendingK2KMessage>
pub fn drain_pending( &self, source: usize, dest: usize, ) -> Vec<PendingK2KMessage>
Get pending messages for a device pair.
Sourcepub fn record_delivery(&self, message: &PendingK2KMessage, payload_size: usize)
pub fn record_delivery(&self, message: &PendingK2KMessage, payload_size: usize)
Record successful message delivery.
Sourcepub fn record_failure(&self)
pub fn record_failure(&self)
Record routing failure.
Sourcepub fn stats(&self) -> CrossGpuRouterStatsSnapshot
pub fn stats(&self) -> CrossGpuRouterStatsSnapshot
Get router statistics.
Auto Trait Implementations§
impl !Freeze for CrossGpuK2KRouter
impl !RefUnwindSafe for CrossGpuK2KRouter
impl Send for CrossGpuK2KRouter
impl Sync for CrossGpuK2KRouter
impl Unpin for CrossGpuK2KRouter
impl !UnwindSafe for CrossGpuK2KRouter
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
Source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.