pub struct BuiltModel {
pub module: GraphModule,
pub params: HashMap<String, Vec<f32>>,
pub typed_params: Vec<(String, Vec<u8>, DType)>,
pub profile: CompileProfile,
/* private fields */
}Expand description
Result of assembling a model flow.
Fields§
§module: GraphModule§params: HashMap<String, Vec<f32>>§typed_params: Vec<(String, Vec<u8>, DType)>Packed U8 params (GGUF quant blobs) attached after compile via set_param_typed.
profile: CompileProfileImplementations§
Source§impl BuiltModel
impl BuiltModel
Sourcepub fn with_execution_config(self, config: &ModelExecutionConfig) -> Self
pub fn with_execution_config(self, config: &ModelExecutionConfig) -> Self
Attach variant + execution preset (shader-component bundle).
Sourcepub fn from_hir(
hir: HirModule,
params: HashMap<String, Vec<f32>>,
) -> Result<Self>
pub fn from_hir( hir: HirModule, params: HashMap<String, Vec<f32>>, ) -> Result<Self>
Wrap a legacy HIR builder product as tier-0 flow output (migration bridge).
Sourcepub fn from_graph(
graph: Graph,
params: HashMap<String, Vec<f32>>,
) -> Result<Self>
pub fn from_graph( graph: Graph, params: HashMap<String, Vec<f32>>, ) -> Result<Self>
Wrap a legacy MIR graph builder product as tier-0 flow output (migration bridge).
pub fn profile(&self) -> &CompileProfile
pub fn params(&self) -> &HashMap<String, Vec<f32>>
pub fn primary_shape(&self) -> &Shape
pub fn output_names(&self) -> &[String]
Sourcepub fn into_graph_parts(self) -> Result<(Graph, HashMap<String, Vec<f32>>)>
pub fn into_graph_parts(self) -> Result<(Graph, HashMap<String, Vec<f32>>)>
(Graph, params) for legacy compile paths.
pub fn into_graph_module(self) -> GraphModule
pub fn into_hir(self) -> Option<HirModule>
pub fn into_graph(self) -> Result<Graph>
pub fn lower(self) -> Result<GraphModule>
Sourcepub fn with_extra_hir_outputs(
self,
extra: impl IntoIterator<Item = HirNodeId>,
) -> Self
pub fn with_extra_hir_outputs( self, extra: impl IntoIterator<Item = HirNodeId>, ) -> Self
Append side outputs after the primary output node.
Trait Implementations§
Source§impl Clone for BuiltModel
impl Clone for BuiltModel
Source§fn clone(&self) -> BuiltModel
fn clone(&self) -> BuiltModel
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for BuiltModel
impl RefUnwindSafe for BuiltModel
impl Send for BuiltModel
impl Sync for BuiltModel
impl Unpin for BuiltModel
impl UnsafeUnpin for BuiltModel
impl UnwindSafe for BuiltModel
Blanket Implementations§
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