SIGN IN SIGN UP

Do not load constant_segment if only the placeholder exists (#5229)

Summary:
Pull Request resolved: https://github.com/pytorch/executorch/pull/5229

1. If constant segment offsets only contains one value, it is the placeholder value for non-const tensors. This means the constant segment is empty, and does not need to be loaded. (T201034228)

2. Clean up before returning error in `prepare_input_tensors`. (T201103889)

Reviewed By: dbort

Differential Revision: D62455987

fbshipit-source-id: ecd3ff792e4501b00c778242e89bdb97a6211e64
L
Lucy Qiu committed
41b463e29d53ec860f44490c2f8574007d22e44d
Parent: 92d0559
Committed by Facebook GitHub Bot <facebook-github-bot@users.noreply.github.com> on 9/11/2024, 6:26:43 PM