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 d1c0b0d
Browse filesBrowse the repository at this point in the historyBrowse files
Remove unused exported tensor constants after Cortex-M lowering (pytorch#22862)
Cortex-M layout conversion leaves original constant placeholders that FX
dead-code elimination preserves. Add a separate
RemoveUnusedConstantsPass to retire unused input specs and storage in
linear time. Include it after constant lifting in both default pass
lists, after padding fusion and scratch sizing.
Lift constants exactly once through the pass list before pruning,
avoiding generated buffer-name collisions. Remove the unconditional
final lifting call: explicit custom lists define the complete pipeline
and can select no cleanup, lifting only, or lifting followed by pruning.
The small lifting adapter makes the existing utility usable by the
standard ExportedProgram pass runner.
Preserve user inputs, mutation and gradient targets, preserved
module-call signatures, and state shared with other entry points. The
existing EXIR pass and other backend defaults remain unchanged. Eleven
focused Python tests passed, including buffer-name collision and all
three custom-list behaviors.
Authored with AI assistance from Codex.
0 commit comments