Commit 41b463e
Do not load constant_segment if only the placeholder exists (#5229)
Summary:
Pull Request resolved: #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: ecd3ff792e4501b00c778242e89bdb97a6211e641 parent 92d0559 commit 41b463e
2 files changed
+5
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
153 | 156 | | |
154 | 157 | | |
155 | | - | |
| 158 | + | |
156 | 159 | | |
157 | 160 | | |
158 | 161 | | |
| |||
0 commit comments