You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit fb67e17
Browse filesBrowse the repository at this point in the historyBrowse files
NXP backend: Add generate_etrecord to ExportRecipe. (pytorch#23106)
### Summary
`export()` has a `generate_etrecord` parameter. When using profiling,
users had to set both
profiling flags on the recipe and `generate_etrecord=True` on the export
call separately,
with no enforcement that the two were kept in sync.
This PR adds `generate_etrecord: bool = False` to `ExportRecipe` so
backends can declare the
requirement as part of the recipe. `ExportSession` resolves the
effective value with OR
semantics: `generate_etrecord or getattr(export_recipe,
"generate_etrecord", False)`.
`ExportRecipe.combine()` also uses OR semantics so the flag propagates
correctly across
combined recipes.
`NXPRecipeProvider` sets `generate_etrecord=rc.use_profiling` on the
Neutron recipe, so
users no longer need to pass `generate_etrecord=True` to `export()` when
enabling profiling.
### Test plan
`pytest export/tests/test_export_session.py
export/tests/test_export_recipe.py
backends/nxp/tests/generic_tests/test_recipe_export.py`
cc @robert-kalmar@JakeStevens@digantdesai@rascani
0 commit comments