Skip to content

Commit e5bb3c0

Browse files
JacobSzwejbkafacebook-github-bot
authored andcommitted
update readme to not use exir.capture
Summary: title Differential Revision: D56265239
1 parent 78cb141 commit e5bb3c0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

backends/apple/coreml/README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ For delegating the Program to the **Core ML** backend, the client must be respon
2828
import executorch.exir as exir
2929
import torch
3030

31+
from torch.export import export
32+
33+
from executorch.exir import to_edge
34+
3135
from executorch.exir.backend.backend_api import to_backend
3236

3337
from executorch.backends.apple.coreml.compiler import CoreMLBackend
@@ -42,7 +46,7 @@ class LowerableSubModel(torch.nn.Module):
4246
# Convert the lowerable module to Edge IR Representation
4347
to_be_lowered = LowerableSubModel()
4448
example_input = (torch.ones(1), )
45-
to_be_lowered_exir_submodule = exir.capture(to_be_lowered, example_input).to_edge()
49+
to_be_lowered_exir_submodule = to_edge(export(to_be_lowered, example_input))
4650

4751
# Lower to Core ML backend
4852
lowered_module = to_backend('CoreMLBackend', to_be_lowered_exir_submodule.exported_program, [])

0 commit comments

Comments
 (0)