Skip to content

Commit c6e8ec6

Browse files
gramalingamCopilot
andauthored
Handling initializers in GraphBuilder (#2889)
(a) Update the logic for creating initializers to ensure that they are always added to the root (main) Graph. (b) Add a utility to convert initializers into Constant nodes (which is necessary for a Function in ONNX). Note: An alternative considered was adding an option to the GraphBuilder so that we automatically construct Constant nodes instead of initializers when the options says so. While that avoids the extra pass in the end, it has some minor implications to what the graph would look like (in terms of whether we want all Constant nodes upfront in one place, and what kind of node-names (based on node numbering) we generate etc. Hence, leaving it in the current form. But it can be changed as above if desirable. --------- Signed-off-by: G Ramalingam <grama@microsoft.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 63ffecf commit c6e8ec6

File tree

3 files changed

+862
-169
lines changed

3 files changed

+862
-169
lines changed

0 commit comments

Comments
 (0)