Skip to content

Commit 132cd27

Browse files
zonglinpengfacebook-github-bot
authored andcommitted
migrate utils from jarvis to cadence
Summary: slim the internal pass utils to backend and testing APIs, and changed their names accordingly, and migrate all functional calls to ET oss. This diff is the minimal change but unfortunately still large Differential Revision: D65458848
1 parent d5459d6 commit 132cd27

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

backends/cadence/aot/pass_utils.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ class CadencePassAttribute:
3030
# A dictionary that maps an ExportPass to its attributes.
3131
_ALL_CADENCE_PASSES: dict[ExportPass, CadencePassAttribute] = {}
3232

33+
def get_all_cadence_passes() -> dict[ExportPass, CadencePassAttribute]:
34+
return _ALL_CADENCE_PASSES
35+
36+
def is_pass_in_cadence(p: ExportPass) -> bool:
37+
return p in _ALL_CADENCE_PASSES
38+
3339

3440
def get_cadence_pass_attribute(p: ExportPass) -> CadencePassAttribute:
3541
return _ALL_CADENCE_PASSES[p]

0 commit comments

Comments
 (0)