Skip to content

Complete pattern rules parquet + short-circuit pattern to supported when all nodes are supported #980

Description

@fangyangci

Background

Currently the supported result of a pattern relies on really compiling/running each pattern case on the EP (see analyze/pattern/check_patterns.py), which is expensive. In addition, the pattern rules parquet table does not cover all patterns yet.

Goals

  1. Complete the pattern rules parquet table so that it covers every registered pattern (aligned with the existing op rules parquet).
  2. Introduce an "all-nodes-supported short circuit" optimization: for a given pattern case, first check whether all of the nodes it contains are already supported (based on the op rules parquet).
    • If all nodes are supported, mark the pattern case as supported directly, without really compiling/running the check.
    • Only fall back to the real check flow when there is an uncertain / unsupported node.

Value

  • Significantly reduces the number of pattern cases that need a real check, lowering runtime cost.
  • Keeps pattern results consistent with op results (if every constituent node is supported, the pattern must be supported).

Related

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions