Skip to content

Remove <model>.pte generation from export_bundled_program.py (#692) #714

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
7 changes: 3 additions & 4 deletions examples/sdk/scripts/export_bundled_program.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

from ...models import MODEL_NAME_TO_MODEL
from ...models.model_factory import EagerModelFactory
from ...portable.utils import export_to_exec_prog, save_pte_program
from ...portable.utils import export_to_exec_prog


def save_bundled_program(
Expand Down Expand Up @@ -54,9 +54,8 @@ def save_bundled_program(
file.write(bundled_program_buffer)


def export_to_pte(model_name, model, method_names, example_inputs):
def export_to_bundled_program(model_name, model, method_names, example_inputs):
exec_prog = export_to_exec_prog(model, example_inputs)
save_pte_program(exec_prog.buffer, model_name)

# Just as an example to show how multiple input sets can be bundled along, here we
# create a list with the example_inputs tuple used twice. Each instance of example_inputs
Expand Down Expand Up @@ -91,4 +90,4 @@ def export_to_pte(model_name, model, method_names, example_inputs):

method_names = ["forward"]

export_to_pte(args.model_name, model, method_names, example_inputs)
export_to_bundled_program(args.model_name, model, method_names, example_inputs)