Struct CrossGpuK2KRouter
pub struct CrossGpuK2KRouter {
coordinator: Arc<MultiGpuCoordinator>,
pending_queues: RwLock<RawRwLock, HashMap<(usize, usize), Vec<PendingK2KMessage>>>,
stats: CrossGpuRouterStats,
}Expand description
Routes K2K messages across GPU boundaries.
Fields§
§coordinator: Arc<MultiGpuCoordinator>§pending_queues: RwLock<RawRwLock, HashMap<(usize, usize), Vec<PendingK2KMessage>>>§stats: CrossGpuRouterStatsImplementations§
§impl CrossGpuK2KRouter
impl CrossGpuK2KRouter
pub fn new(coordinator: Arc<MultiGpuCoordinator>) -> Arc<CrossGpuK2KRouter>
pub fn new(coordinator: Arc<MultiGpuCoordinator>) -> Arc<CrossGpuK2KRouter>
Create a new cross-GPU K2K router.
pub fn route_message(
&self,
source_kernel: &KernelId,
dest_kernel: &KernelId,
message: K2KMessage,
) -> Result<RoutingDecision, RingKernelError>
pub fn route_message( &self, source_kernel: &KernelId, dest_kernel: &KernelId, message: K2KMessage, ) -> Result<RoutingDecision, RingKernelError>
Route a message from source kernel to destination kernel.
pub 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.
pub fn record_delivery(&self, message: &PendingK2KMessage, payload_size: usize)
pub fn record_delivery(&self, message: &PendingK2KMessage, payload_size: usize)
Record successful message delivery.
pub fn record_failure(&self)
pub fn record_failure(&self)
Record routing failure.
pub 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§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
§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
§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
§fn deserialize(
&self,
deserializer: &mut D,
) -> Result<With<T, W>, <D as Fallible>::Error>
fn deserialize( &self, deserializer: &mut D, ) -> Result<With<T, W>, <D as Fallible>::Error>
Deserializes using the given deserializer
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
§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.