Skip to main content

CollectiveMsg

Enum CollectiveMsg 

Source
pub enum CollectiveMsg {
    Op(Box<dyn CollectiveDispatch>),
    BeginGroup {
        reply: Sender<Result<(), GpuError>>,
    },
    EndGroup {
        reply: Sender<Result<(), GpuError>>,
    },
    QueryCapabilities {
        reply: Sender<NcclCapabilities>,
    },
    AllReduceF32 {
        tensor: GpuRef<f32>,
        op: ReduceOp,
        reply: Sender<Result<(), GpuError>>,
    },
    BroadcastF32 {
        data: GpuRef<f32>,
        root: usize,
        reply: Sender<Result<(), GpuError>>,
    },
}
Expand description

Public message surface for the CollectiveActor. Hot path goes through CollectiveMsg::Op which carries a boxed CollectiveDispatch; the legacy AllReduceF32 / BroadcastF32 variants remain for back-compat and route through the same machinery.

Variants§

§

Op(Box<dyn CollectiveDispatch>)

Boxed dispatch: any typed *Request<T: NcclReduceSupported> implements CollectiveDispatch and ships through this variant. New ops (AllGather, ReduceScatter, AllToAll, …) all arrive this way.

§

BeginGroup

Begin a group call. Issues ncclGroupStart on this rank.

Fields

§reply: Sender<Result<(), GpuError>>
§

EndGroup

End a group call. Issues ncclGroupEnd on this rank.

Fields

§reply: Sender<Result<(), GpuError>>
§

QueryCapabilities

Probe the loaded NCCL library for capabilities (version, fp8 / NVLS / SHARP support). Returns zeros if NCCL isn’t initialised on this host.

Fields

§reply: Sender<NcclCapabilities>
§

AllReduceF32

👎Deprecated: use CollectiveMsg::Op(Box::new(AllReduceRequest::<f32> { … })) instead

Legacy alias preserved for back-compat. New callers should build AllReduceRequest<f32> and ship via CollectiveMsg::Op.

Fields

§tensor: GpuRef<f32>
👎Deprecated: use CollectiveMsg::Op(Box::new(AllReduceRequest::<f32> { … })) instead
§op: ReduceOp
👎Deprecated: use CollectiveMsg::Op(Box::new(AllReduceRequest::<f32> { … })) instead
§reply: Sender<Result<(), GpuError>>
👎Deprecated: use CollectiveMsg::Op(Box::new(AllReduceRequest::<f32> { … })) instead
§

BroadcastF32

👎Deprecated: use CollectiveMsg::Op(Box::new(BroadcastRequest::<f32> { … })) instead

Legacy alias preserved for back-compat. New callers should build BroadcastRequest<f32> and ship via CollectiveMsg::Op.

Fields

§data: GpuRef<f32>
👎Deprecated: use CollectiveMsg::Op(Box::new(BroadcastRequest::<f32> { … })) instead
§root: usize
👎Deprecated: use CollectiveMsg::Op(Box::new(BroadcastRequest::<f32> { … })) instead
§reply: Sender<Result<(), GpuError>>
👎Deprecated: use CollectiveMsg::Op(Box::new(BroadcastRequest::<f32> { … })) instead

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more