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
- Complete the pattern rules parquet table so that it covers every registered pattern (aligned with the existing op rules parquet).
- 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
Background
Currently the
supportedresult of a pattern relies on really compiling/running each pattern case on the EP (seeanalyze/pattern/check_patterns.py), which is expensive. In addition, the pattern rules parquet table does not cover all patterns yet.Goals
supported(based on the op rules parquet).supported, mark the pattern case as supported directly, without really compiling/running the check.Value
Related