Commit 659b383
Do not load constant_segment if only the placeholder exists (pytorch#5229)
Summary:
Pull Request resolved: pytorch#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`. (T201165663)
Differential Revision: D624559871 parent 4cce620 commit 659b383
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