Skip to main content

MlxCompiledMultiOutputGraph

Struct MlxCompiledMultiOutputGraph 

Source
pub struct MlxCompiledMultiOutputGraph { /* private fields */ }
Expand description

Owns one compiled MLX graph that produces an ordered vector of outputs.

Model-side compiled composites that need several outputs at once — the multi-token-prediction verification window returns successor states beside its logits — construct one of these with their own graph builder and apply it through MlxBindingsContext::apply_compiled_multi_output_graph. Output order is the builder’s write order and never changes after compilation.

Implementations§

Source§

impl MlxCompiledMultiOutputGraph

Source

pub fn new( graph_builder: MlxGraphBuilder, compile_operation: &'static str, shapeless: bool, ) -> Result<Self, MlxCError>

Compiles the given graph builder into a replayable multi-output graph. The shapeless flag carries the same shape-specialization tradeoff as the single-output compiled graph constructor.

Trait Implementations§

Source§

impl Debug for MlxCompiledMultiOutputGraph

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

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.

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.