Skip to content

Commit 703bf89

Browse files
zonglinpengfacebook-github-bot
authored andcommitted
solve G3 nightly case not found flakiness
Summary: solved facto bug in stack, and only generate one operator once Differential Revision: D75032734
1 parent 4014cc6 commit 703bf89

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

backends/cadence/utils/facto_util.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,11 @@
1212
import torch
1313
from facto.inputgen.argtuple.gen import ArgumentTupleGenerator
1414
from facto.inputgen.specs.model import ConstraintProducer as cp
15-
from facto.inputgen.utils.random_manager import random_manager
1615
from facto.inputgen.variable.type import ScalarDtype
1716
from facto.specdb.db import SpecDictDB
17+
from functools import lru_cache
1818

1919
# seed to generate identical cases every run to reproduce from bisect
20-
random_manager.seed(1729)
2120
MAX_CASES = 50
2221

2322

@@ -103,7 +102,7 @@ def apply_scalar_contraints(op_name: str) -> list[ScalarDtype]:
103102
case _:
104103
return [ScalarDtype.float, ScalarDtype.int]
105104

106-
105+
@lru_cache(maxsize=None)
107106
def facto_testcase_gen(op_name: str) -> List[Tuple[List[str], OrderedDict[str, str]]]:
108107
# minimal example to test add.Tensor using FACTO
109108
spec = SpecDictDB[op_name]

0 commit comments

Comments
 (0)