Skip to content

feat: support custom ExecutorchBackendConfig in save(output_format='executorch')#4345

Open
shoumikhin wants to merge 1 commit into
pytorch:mainfrom
shoumikhin:executorch-save-backend-config-pr
Open

feat: support custom ExecutorchBackendConfig in save(output_format='executorch')#4345
shoumikhin wants to merge 1 commit into
pytorch:mainfrom
shoumikhin:executorch-save-backend-config-pr

Conversation

@shoumikhin

Copy link
Copy Markdown
Contributor

Description

torch_tensorrt.save(..., output_format="executorch") previously called edge_program.to_executorch() with no arguments, so the default ExecutorchBackendConfig was always used and callers had no way to customize ExecuTorch lowering (e.g. memory planning or device placement).

This adds an optional backend_config kwarg to save() that is forwarded to to_executorch(), mirroring the existing partitioners= and compile_specs= kwargs. When backend_config is passed with a non-executorch output_format it is ignored with a warning, matching the existing behavior for those kwargs.

Type of change

  • New feature (non-breaking change which adds functionality)

@meta-cla meta-cla Bot added the cla signed label Jun 16, 2026
@github-actions github-actions Bot added the component: api [Python] Issues re: Python API label Jun 16, 2026
@shoumikhin shoumikhin force-pushed the executorch-save-backend-config-pr branch from fc3dd0b to 6d52732 Compare June 16, 2026 20:19
…xecutorch')

torch_tensorrt.save(..., output_format="executorch") previously called edge_program.to_executorch() with no arguments, so the default ExecutorchBackendConfig was always used and callers had no way to customize ExecuTorch lowering (e.g. memory planning or device placement).

Add an optional backend_config kwarg to save() that is forwarded to to_executorch(), mirroring the existing partitioners= and compile_specs= kwargs. When backend_config is passed with a non-executorch output_format it is ignored with a warning, matching the existing behavior for partitioners= and compile_specs=.
@shoumikhin shoumikhin force-pushed the executorch-save-backend-config-pr branch from 6d52732 to 7259377 Compare June 16, 2026 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant