Replies: 2 comments 2 replies
-
Looks great. I have a few small thoughts:
|
Beta Was this translation helpful? Give feedback.
1 reply
-
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Overview
Currently, ETRecord generation is separated from the export flow, which increases ramping up costs for users and makes it impossible for high-level export APIs like
to_edge_transform_and_lower()
andexecutorch.export()
to generate ETRecord due to hiding the essential information under-the-neath. This document proposes integrating ETRecord generation directly into the export flow with configurable support.Goals
Current State Analysis
Current Export APIs
executorch.export()
- High-level export function returningExportSession
to_edge()
- Converts ExportedProgram to EdgeProgramManagerto_edge_transform_and_lower()
- Combines edge conversion with partitioning/loweringCurrent ETRecord Generation
generate_etrecord()
function in/data/users/gasoonjia/fbsource/fbcode/executorch/devtools/etrecord/_etrecord.py
EdgeProgramManager
,ExecutorchProgram
/ExecutorchProgramManager
/BundledProgram
, and optionalExportedProgram
Proposed Solution
1. Add
generate_etrecord
Parameter to Export APIsTarget APIs After Changes:
executorch.export()
to_edge()
to_edge_transform_and_lower()
2. Add
get_etrecord()
Method to Return ObjectsExportSession Enhancement
ExecutorchProgramManager Enhancement
3. ETRecord Dump Functionality
ETRecord Class Enhancement
Target Usage Flows
Flow 1: High-level export() API with ETRecord
Flow 2: to_edge_transform_and_lower() with ETRecord
Flow 3: to_edge() with ETRecord
Flow 4: Backward Compatibility - Existing ETRecord Generation
Benefits
This design ensures a smooth transition while providing the requested functionality with zero impact on existing workflows.
Beta Was this translation helpful? Give feedback.
All reactions