Skip to main content

ContextMsg

Enum ContextMsg 

Source
pub enum ContextMsg {
Show 23 variants Init, SnapshotStream { reply: Sender<Option<Arc<CudaStream>>>, }, Alloc(Box<dyn AllocDispatch>), CopyToHost(Box<dyn CopyToHostDispatch>), CopyFromHost(Box<dyn CopyFromHostDispatch>), AllocateF32 { len: usize, reply: Sender<Result<GpuRef<f32>, GpuError>>, }, AllocateF64 { len: usize, reply: Sender<Result<GpuRef<f64>, GpuError>>, }, AllocateI8 { len: usize, reply: Sender<Result<GpuRef<i8>, GpuError>>, }, AllocateI32 { len: usize, reply: Sender<Result<GpuRef<i32>, GpuError>>, }, AllocateI64 { len: usize, reply: Sender<Result<GpuRef<i64>, GpuError>>, }, AllocateU8 { len: usize, reply: Sender<Result<GpuRef<u8>, GpuError>>, }, AllocateU32 { len: usize, reply: Sender<Result<GpuRef<u32>, GpuError>>, }, AllocateU64 { len: usize, reply: Sender<Result<GpuRef<u64>, GpuError>>, }, CopyToHostF32 { src: GpuRef<f32>, dst: HostBuf<f32>, reply: Sender<Result<HostBuf<f32>, GpuError>>, }, CopyFromHostF32 { src: HostBuf<f32>, dst: GpuRef<f32>, reply: Sender<Result<HostBuf<f32>, GpuError>>, }, CopyToHostF64 { src: GpuRef<f64>, dst: HostBuf<f64>, reply: Sender<Result<HostBuf<f64>, GpuError>>, }, CopyFromHostF64 { src: HostBuf<f64>, dst: GpuRef<f64>, reply: Sender<Result<HostBuf<f64>, GpuError>>, }, CopyToHostI32 { src: GpuRef<i32>, dst: HostBuf<i32>, reply: Sender<Result<HostBuf<i32>, GpuError>>, }, CopyFromHostI32 { src: HostBuf<i32>, dst: GpuRef<i32>, reply: Sender<Result<HostBuf<i32>, GpuError>>, }, CopyToHostU32 { src: GpuRef<u32>, dst: HostBuf<u32>, reply: Sender<Result<HostBuf<u32>, GpuError>>, }, CopyFromHostU32 { src: HostBuf<u32>, dst: GpuRef<u32>, reply: Sender<Result<HostBuf<u32>, GpuError>>, }, CopyToHostU8 { src: GpuRef<u8>, dst: HostBuf<u8>, reply: Sender<Result<HostBuf<u8>, GpuError>>, }, CopyFromHostU8 { src: HostBuf<u8>, dst: GpuRef<u8>, reply: Sender<Result<HostBuf<u8>, GpuError>>, },
}

Variants§

§

Init

Self-sent from pre_start and post_restart. Builds (or rebuilds) the CudaContext and spawns library children.

§

SnapshotStream

Phase 4.5++ — reply with the primary Arc<CudaStream> owned by this ContextActor. Used by downstream raw-pointer FFI shims (TensorRT enqueueV3) that need to share the device’s execution timeline. Replies None when the context hasn’t finished Init yet (or in mock mode).

Fields

§reply: Sender<Option<Arc<CudaStream>>>
§

Alloc(Box<dyn AllocDispatch>)

Phase 0.4 generic allocation. Carries a typed Box<dyn AllocDispatch> that the handler invokes via AllocDispatch::run. Replaces the per-dtype Allocate* variants below — those remain as #[deprecated] aliases constructed by DeviceActor::handle so existing call sites keep compiling.

§

CopyToHost(Box<dyn CopyToHostDispatch>)

Phase 0.4 generic D2H copy.

§

CopyFromHost(Box<dyn CopyFromHostDispatch>)

Phase 0.4 generic H2D copy.

§

AllocateF32

Fields

§len: usize
§reply: Sender<Result<GpuRef<f32>, GpuError>>
§

AllocateF64

Fields

§len: usize
§reply: Sender<Result<GpuRef<f64>, GpuError>>
§

AllocateI8

Fields

§len: usize
§reply: Sender<Result<GpuRef<i8>, GpuError>>
§

AllocateI32

Fields

§len: usize
§reply: Sender<Result<GpuRef<i32>, GpuError>>
§

AllocateI64

Fields

§len: usize
§reply: Sender<Result<GpuRef<i64>, GpuError>>
§

AllocateU8

Fields

§len: usize
§reply: Sender<Result<GpuRef<u8>, GpuError>>
§

AllocateU32

Fields

§len: usize
§reply: Sender<Result<GpuRef<u32>, GpuError>>
§

AllocateU64

Fields

§len: usize
§reply: Sender<Result<GpuRef<u64>, GpuError>>
§

CopyToHostF32

Fields

§reply: Sender<Result<HostBuf<f32>, GpuError>>
§

CopyFromHostF32

Fields

§reply: Sender<Result<HostBuf<f32>, GpuError>>
§

CopyToHostF64

Fields

§reply: Sender<Result<HostBuf<f64>, GpuError>>
§

CopyFromHostF64

Fields

§reply: Sender<Result<HostBuf<f64>, GpuError>>
§

CopyToHostI32

Fields

§reply: Sender<Result<HostBuf<i32>, GpuError>>
§

CopyFromHostI32

Fields

§reply: Sender<Result<HostBuf<i32>, GpuError>>
§

CopyToHostU32

Fields

§reply: Sender<Result<HostBuf<u32>, GpuError>>
§

CopyFromHostU32

Fields

§reply: Sender<Result<HostBuf<u32>, GpuError>>
§

CopyToHostU8

Fields

§src: GpuRef<u8>
§reply: Sender<Result<HostBuf<u8>, GpuError>>
§

CopyFromHostU8

Fields

§dst: GpuRef<u8>
§reply: Sender<Result<HostBuf<u8>, GpuError>>

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