MCPcopy Create free account
hub / github.com/apache/tvm / ShapePattern

Class ShapePattern

python/tvm/relax/dpl/pattern.py:609–622  ·  view source on GitHub ↗

A pattern that matches another pattern with a certain tensor shape Parameters ---------- pattern: tvm.relax.dpl.DFPattern The input pattern that needs type annotation. shape: List[tvm.ir.PrimExpr] The shape to match.

Source from the content-addressed store, hash-verified

607
608@register_df_node
609class ShapePattern(DFPattern):
610 """A pattern that matches another pattern with a certain tensor shape
611
612 Parameters
613 ----------
614 pattern: tvm.relax.dpl.DFPattern
615 The input pattern that needs type annotation.
616
617 shape: List[tvm.ir.PrimExpr]
618 The shape to match.
619 """
620
621 def __init__(self, pattern: "DFPattern", shape: list[tvm.ir.PrimExpr]):
622 self.__init_handle_by_constructor__(ffi.ShapePattern, pattern, shape) # type: ignore
623
624
625@register_df_node

Callers 1

has_shapeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…