Skip to content

Commit cc5e341

Browse files
manuelcandalesfacebook-github-bot
authored andcommitted
Add argmode argument to DtypeRunner.run (#350)
Summary: Pull Request resolved: #350 This will speed up spec generation, since `run_dtypes` will not attempt random tensors first. Reviewed By: larryliu0820 Differential Revision: D49217150 fbshipit-source-id: 909a09b364ec17571afdfec0361dee8bebbe107a
1 parent d301047 commit cc5e341

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

exir/dialects/edge/dtype/runner.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,10 @@ def run_dtypes(
172172
return (False, name, dtypes, ones_args, ones_kwargs)
173173

174174
def run(
175-
self, name: str, inputs: Dict[str, List[BaseArg]]
175+
self,
176+
name: str,
177+
inputs: Dict[str, List[BaseArg]],
178+
argmode: ArgMode = ArgMode.ONES,
176179
) -> List[
177180
Tuple[
178181
bool, str, Tuple[Optional[torch.dtype]], List[BaseArg], Dict[str, BaseKwarg]
@@ -181,5 +184,5 @@ def run(
181184
results = []
182185
type_tuples = self._get_type_tuples(inputs)
183186
for element in itertools.product(*type_tuples):
184-
results.append(self.run_dtypes(name, inputs, element))
187+
results.append(self.run_dtypes(name, inputs, element, argmode))
185188
return results

0 commit comments

Comments
 (0)