pub enum StreamMessage {
Show 23 variants
CallFunction(CallFunctionParams, HashMap<Ref, DeviceMesh>, HashMap<Ref, (DeviceMesh, Vec<String>, Arc<ActorHandle<NcclCommActor>>)>),
BorrowCreate {
borrow: u64,
tensor: Ref,
first_use_sender: PortHandle<(Option<Event>, TensorCellResult)>,
},
BorrowFirstUse {
borrow: u64,
result: Ref,
first_use_receiver: Arc<Mutex<PortReceiver<(Option<Event>, TensorCellResult)>>>,
},
BorrowLastUse {
borrow: u64,
result: Ref,
last_use_sender: PortHandle<(Option<Event>, TensorCellResult)>,
},
BorrowDrop {
borrow: u64,
last_use_receiver: Arc<Mutex<PortReceiver<(Option<Event>, TensorCellResult)>>>,
},
DeleteRefs(Vec<Ref>),
RequestStatus(OncePortHandle<()>),
InitComm(ActorHandle<NcclCommActor>),
Reduce {
comm: Arc<ActorHandle<NcclCommActor>>,
dim_size: i64,
result: Ref,
local_tensor: Ref,
factory: Factory,
reduction: Reduction,
scatter: bool,
in_place: bool,
out: Option<Ref>,
},
SendTensor {
result: Ref,
from_rank: Option<usize>,
to_rank: Option<usize>,
tensor: Ref,
factory: Factory,
comm: Arc<ActorHandle<NcclCommActor>>,
},
SendValue {
seq: Seq,
worker_actor_id: ActorId,
mutates: Vec<Ref>,
function: Option<ResolvableFunction>,
args: Vec<WireValue>,
kwargs: HashMap<String, WireValue>,
device_meshes: HashMap<Ref, DeviceMesh>,
pipe: Option<PortHandle<PipeMessage>>,
},
SetValue {
seq: Seq,
results: Vec<Option<Ref>>,
pipe: PortHandle<PipeMessage>,
},
DefineRecording {
recording: Ref,
},
FinalizeRecording {
recording: Ref,
},
CallRecording {
seq: Seq,
recording: Ref,
results: Vec<Ref>,
actuals: Vec<Ref>,
},
RecordingFormal {
result: Ref,
argument_index: usize,
},
RecordingResult {
result: Ref,
output_index: usize,
},
SetRefUnitTestsOnly(Ref, WireValue),
SetTensorRefUnitTestsOnly(Ref, TensorCellResult),
GetRefUnitTestsOnly(Ref, OncePortHandle<Option<Result<WireValue, String>>>),
GetTensorRefUnitTestsOnly(Ref, OncePortHandle<Option<TensorCellResult>>),
SendResultOfActorCall(ActorId, ActorCallParams),
CallActorMethod(ActorMethodParams),
}
Expand description
Messages handled by the stream. Generally these are stream-local versions of
crate::WorkerMessage
.
Variants§
CallFunction(CallFunctionParams, HashMap<Ref, DeviceMesh>, HashMap<Ref, (DeviceMesh, Vec<String>, Arc<ActorHandle<NcclCommActor>>)>)
BorrowCreate
Fields
§
first_use_sender: PortHandle<(Option<Event>, TensorCellResult)>
Port for sending the first use CUDA event + borrowed tensor to the borrower.
BorrowFirstUse
Fields
§
first_use_receiver: Arc<Mutex<PortReceiver<(Option<Event>, TensorCellResult)>>>
Port for receiving the first use CUDA event + borrowed tensor from the provider stream.
BorrowLastUse
Fields
§
last_use_sender: PortHandle<(Option<Event>, TensorCellResult)>
Port for sending the last use CUDA event and borrowed tensor.
BorrowDrop
Fields
§
last_use_receiver: Arc<Mutex<PortReceiver<(Option<Event>, TensorCellResult)>>>
Port for receiving the last use CUDA event and borrowed tensor.
DeleteRefs(Vec<Ref>)
RequestStatus(OncePortHandle<()>)
InitComm(ActorHandle<NcclCommActor>)
Reduce
Fields
§
comm: Arc<ActorHandle<NcclCommActor>>
SendTensor
Fields
§
comm: Arc<ActorHandle<NcclCommActor>>
SendValue
Fields
§
function: Option<ResolvableFunction>
§
device_meshes: HashMap<Ref, DeviceMesh>
§
pipe: Option<PortHandle<PipeMessage>>
SetValue
DefineRecording
FinalizeRecording
CallRecording
RecordingFormal
RecordingResult
SetRefUnitTestsOnly(Ref, WireValue)
SetTensorRefUnitTestsOnly(Ref, TensorCellResult)
GetRefUnitTestsOnly(Ref, OncePortHandle<Option<Result<WireValue, String>>>)
GetTensorRefUnitTestsOnly(Ref, OncePortHandle<Option<TensorCellResult>>)
SendResultOfActorCall(ActorId, ActorCallParams)
CallActorMethod(ActorMethodParams)
Trait Implementations§
Source§impl Debug for StreamMessage
impl Debug for StreamMessage
Source§impl Handler<StreamMessage> for StreamActor
impl Handler<StreamMessage> for StreamActor
Source§impl Named for StreamMessage
impl Named for StreamMessage
Source§fn typename() -> &'static str
fn typename() -> &'static str
The globally unique type name for the type.
This should typically be the fully qualified Rust name of the type.
Source§fn typehash() -> u64
fn typehash() -> u64
A globally unique hash for this type.
TODO: actually enforce perfect hashing
Source§fn arm(&self) -> Option<&'static str>
fn arm(&self) -> Option<&'static str>
If the named type is an enum, this returns the name of the arm
of the value self.
Source§fn typeid() -> TypeId
fn typeid() -> TypeId
The TypeId for this type. TypeIds are unique only within a binary,
and should not be used for global identification.
Auto Trait Implementations§
impl !Freeze for StreamMessage
impl !RefUnwindSafe for StreamMessage
impl Send for StreamMessage
impl Sync for StreamMessage
impl Unpin for StreamMessage
impl !UnwindSafe for StreamMessage
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
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<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<A, M> Handler<IndexedErasedUnbound<M>> for A
impl<A, M> Handler<IndexedErasedUnbound<M>> for A
§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