Commit dc52443
feat: store all initializers in root graph, not just cached constants
Extend the root-graph invariant to the initializer() method itself,
not just the cached literal path in _get_or_create_constant(). Now
every call to builder.initializer() registers the value in
self._root._graph, ensuring that direct initializer creation from
sub-builders also goes to the root graph.
This maintains a clean invariant: all initializers live in the root
graph, regardless of which builder created them.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: G Ramalingam <grama@microsoft.com>1 parent be51b98 commit dc52443
2 files changed
+32
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
318 | 318 | | |
319 | 319 | | |
320 | 320 | | |
321 | | - | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
322 | 329 | | |
323 | 330 | | |
324 | 331 | | |
| |||
327 | 334 | | |
328 | 335 | | |
329 | 336 | | |
330 | | - | |
| 337 | + | |
331 | 338 | | |
332 | 339 | | |
333 | 340 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1504 | 1504 | | |
1505 | 1505 | | |
1506 | 1506 | | |
| 1507 | + | |
| 1508 | + | |
| 1509 | + | |
| 1510 | + | |
| 1511 | + | |
| 1512 | + | |
| 1513 | + | |
| 1514 | + | |
| 1515 | + | |
| 1516 | + | |
| 1517 | + | |
| 1518 | + | |
| 1519 | + | |
| 1520 | + | |
| 1521 | + | |
| 1522 | + | |
| 1523 | + | |
| 1524 | + | |
| 1525 | + | |
| 1526 | + | |
| 1527 | + | |
| 1528 | + | |
| 1529 | + | |
1507 | 1530 | | |
1508 | 1531 | | |
1509 | 1532 | | |
| |||
0 commit comments