-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Address some issues and fix VS 2026 build #26905
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 4 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
82b5b7f
Address some security issues.
skottmckay 47a4785
Add missed update
skottmckay 70599ed
Address PR comment
skottmckay 631e967
Rename some files that match ICM ticket numbers.
skottmckay 849b14b
Remove change that was accidentally included.
skottmckay 5ca5436
Address PR feedback
skottmckay File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| import onnx | ||
github-advanced-security[bot] marked this conversation as resolved.
Fixed
Show fixed
Hide fixed
|
||
| from onnx import TensorProto, helper | ||
|
|
||
| # Add node with a subgraph that has no inputs or outputs. | ||
| # Graph::BuildConnections should remove and the list of subgraphs in Graph::Resolve should be updated. | ||
| # Other details here don't matter. Copied from ort_github_issue_10305.py | ||
| if_body = helper.make_graph( | ||
| [ | ||
| # need to use main_graph_initializer in a way that can't be constant folded | ||
| helper.make_node("Constant", inputs=[], outputs=["zero"], name="Constant", value_int=0), | ||
| ], | ||
| "if_branch_body", | ||
| [ | ||
| # no explicit inputs | ||
| ], | ||
| [ | ||
| helper.make_tensor_value_info("zero", TensorProto.BOOL, [1]), | ||
| ], | ||
| ) | ||
|
|
||
| # Create the main graph | ||
| graph_proto = helper.make_graph( | ||
| [ | ||
| # add a Transpose that can be moved past the Slice | ||
| helper.make_node( | ||
| "Transpose", | ||
| inputs=["input:0"], | ||
| outputs=["transpose:0"], | ||
| name="transpose0", | ||
| perm=[1, 0, 2], | ||
| ), | ||
| helper.make_node( | ||
| "If", | ||
| [], | ||
| [], | ||
| "If1", | ||
| then_branch=if_body, | ||
| else_branch=if_body, | ||
| ), | ||
| ], | ||
| "Main_graph", | ||
| [ | ||
| helper.make_tensor_value_info("input:0", TensorProto.FLOAT, [2, 2, 2]), | ||
| helper.make_tensor_value_info("state_var_in", TensorProto.FLOAT, [1]), | ||
| ], | ||
| [ | ||
| helper.make_tensor_value_info("transpose:0", TensorProto.FLOAT, [2, 2]), | ||
| ], | ||
| ) | ||
|
|
||
| model = helper.make_model(graph_proto) | ||
| # onnx.checker.check_model(model, True) | ||
skottmckay marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| onnx.save(model, "msrc-31000000518483.onnx") | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.