pub struct TritonLowering { /* private fields */ }Implementations§
Source§impl TritonLowering
impl TritonLowering
Sourcepub fn lower_with_mapping(
&self,
graph: &Graph,
mode: LoweringMode,
) -> Result<(Dag<Box<dyn ExecutableOp>>, Vec<usize>)>
pub fn lower_with_mapping( &self, graph: &Graph, mode: LoweringMode, ) -> Result<(Dag<Box<dyn ExecutableOp>>, Vec<usize>)>
Like lower but also returns the graph-node-index → DAG-node-index mapping.
Useful for middleware lowerings that need to patch specific DAG nodes after
the base lowering runs.
Trait Implementations§
Source§impl Debug for TritonLowering
impl Debug for TritonLowering
Source§impl Default for TritonLowering
impl Default for TritonLowering
Source§fn default() -> TritonLowering
fn default() -> TritonLowering
Returns the “default value” for a type. Read more
Source§impl<'a> Lowering<'a> for TritonLowering
impl<'a> Lowering<'a> for TritonLowering
Source§fn extra_dag_names(
&self,
graph: &Graph,
graph_to_dag: &[usize],
) -> Vec<(usize, String)>
fn extra_dag_names( &self, graph: &Graph, graph_to_dag: &[usize], ) -> Vec<(usize, String)>
Conv2d-with-bias splits one graph node into two DAG nodes (conv + biasadd).
graph_to_dag[graph_idx] already points at the biasadd DAG node; here we
propagate the same name to the conv DAG node (biasadd_dag_idx - 1) so that
the conv weight parameter can be loaded under the same name prefix.
Source§fn lower(
&self,
graph: &Graph,
mode: LoweringMode,
) -> Result<Dag<Box<dyn ExecutableOp>>>
fn lower( &self, graph: &Graph, mode: LoweringMode, ) -> Result<Dag<Box<dyn ExecutableOp>>>
Lowers
graph for mode.Source§fn lower_with_mapping(
&self,
graph: &Graph,
mode: LoweringMode,
) -> Result<(Dag<Box<dyn ExecutableOp>>, Vec<usize>)>
fn lower_with_mapping( &self, graph: &Graph, mode: LoweringMode, ) -> Result<(Dag<Box<dyn ExecutableOp>>, Vec<usize>)>
Like [
lower] but also returns a graph_node_idx → dag_node_idx mapping
so that graph-level metadata (e.g. names) can be propagated into the compiled DAG. Read moreSource§fn base_lowering(&self) -> Option<&dyn Lowering<'a>>
fn base_lowering(&self) -> Option<&dyn Lowering<'a>>
Returns the next lowering in a middleware chain, or
None if this is
the final lowering. A custom lowering can call self.base_lowering()
to delegate ops it does not handle.Auto Trait Implementations§
impl Freeze for TritonLowering
impl RefUnwindSafe for TritonLowering
impl Send for TritonLowering
impl Sync for TritonLowering
impl Unpin for TritonLowering
impl UnsafeUnpin for TritonLowering
impl UnwindSafe for TritonLowering
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