microsoft / microsoft/winml-cli

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

Open
#980 1 comment 0 reactions 1 assignee View on GitHub

Nobody has claimed this yet.

enhancement P2 static-analyzer triaged
Dominant language
Python
Stars
40
Forks
11
Avg merge
1d 8h
Merged PRs (30d)
50

Description

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

  • Related to #981 (clean up analyze subgraph pattern logic): this issue is the prerequisite for pattern results being fully derived from the rules parquet.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.