Skip to content

update readme to not use exir.capture #3107

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion backends/apple/coreml/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ For delegating the Program to the **Core ML** backend, the client must be respon
import executorch.exir as exir
import torch

from torch.export import export

from executorch.exir import to_edge

from executorch.exir.backend.backend_api import to_backend

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

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