Skip to content

Commit e2a8936

Browse files
hsharma35facebook-github-bot
authored andcommitted
Enable constant methods in cadence export.
Summary: Add option to specify constant methods in export. Differential Revision: D68637824
1 parent 1f1a96f commit e2a8936

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

backends/cadence/aot/compiler.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
import logging
1010
from pathlib import Path
11-
from typing import Callable, cast, Optional
11+
from typing import Any, Callable, cast, Optional
1212

1313
import executorch.backends.cadence.aot.ops_registrations # noqa
1414
import torch
@@ -174,6 +174,7 @@ def export_to_edge(
174174
model: torch.nn.Module,
175175
inputs: tuple[object, ...],
176176
dump_graphs: bool = False,
177+
constant_methods: Optional[dict[str, Any]] = None,
177178
) -> EdgeProgramManager:
178179
assert isinstance(model, torch.nn.Module), "model should be an nn.Module"
179180

@@ -195,6 +196,7 @@ def export_to_edge(
195196
torch.ops.aten.angle.default,
196197
],
197198
),
199+
constant_methods=constant_methods,
198200
)
199201

200202
if dump_graphs:

0 commit comments

Comments
 (0)