Skip to content
Merged
Show file tree
Hide file tree
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
38 changes: 38 additions & 0 deletions export/TARGETS
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
load("@fbcode_macros//build_defs:python_library.bzl", "python_library")

oncall("executorch")

python_library(
name = "recipe",
srcs = [
"recipe.py",
],
deps = [
"//caffe2:torch",
"//executorch/exir/backend:backend_api",
"//executorch/exir:pass_manager",
"//executorch/devtools/backend_debug:delegation_info",
]
)

python_library(
name = "export",
srcs = [
"export.py",
],
deps = [
":recipe",
"//executorch/runtime:runtime",
]
)

python_library(
name = "lib",
srcs = [
"__init__.py",
],
deps = [
":export",
":recipe",
],
)
24 changes: 24 additions & 0 deletions export/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Copyright (c) Meta Platforms, Inc. and affiliates.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The directory structure is bit confusing. People coming to ET already know export and now we are teaching them of a different export.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe executorch/lower or executorch/pipeline?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thought quite a bit about this, the main reasoning to call this export too is because we're consuming the export call within the API. One of the main points of this API is that if someone wants to target ExecuTorch they don't even need to learn about torch.export (although many of them probably will).

# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.

"""
ExecuTorch export module.

This module provides the tools and utilities for exporting PyTorch models
to the ExecuTorch format, including configuration, quantization, and
export management.
"""

# pyre-strict

from .export import export, ExportSession
from .recipe import ExportRecipe

__all__ = [
"ExportRecipe",
"ExportSession",
"export",
]
Loading
Loading