Skip to content

Commit 9ea7ba7

Browse files
authored
solve G3 nightly case not found flakiness
Differential Revision: D75032734 Pull Request resolved: #11106
1 parent 0cf2d53 commit 9ea7ba7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

backends/cadence/utils/facto_util.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,16 @@
77
# pyre-strict
88

99
import copy
10+
from functools import lru_cache
1011
from typing import List, OrderedDict, Tuple
1112

1213
import torch
1314
from facto.inputgen.argtuple.gen import ArgumentTupleGenerator
1415
from facto.inputgen.specs.model import ConstraintProducer as cp
15-
from facto.inputgen.utils.random_manager import random_manager
1616
from facto.inputgen.variable.type import ScalarDtype
1717
from facto.specdb.db import SpecDictDB
1818

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

2322

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

106105

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

0 commit comments

Comments
 (0)