Skip to content

Put the initializers at the end of the cluster inputs list#1751

Merged
jywu-msft merged 1 commit intomicrosoft:masterfrom
NervanaSystems:tomdol/cluster_inputs_reorder
Sep 3, 2019
Merged

Put the initializers at the end of the cluster inputs list#1751
jywu-msft merged 1 commit intomicrosoft:masterfrom
NervanaSystems:tomdol/cluster_inputs_reorder

Conversation

@tomdol
Copy link
Copy Markdown
Contributor

@tomdol tomdol commented Sep 3, 2019

This PR contains a fix for the Reshape error which was observed when inferencing some models (for example YOLOv3). Only non-const inputs are required by the ngraph::Executable when it gets called and thus, during the partitioning phase, the initializers are placed at the end of the subgraph inputs. This makes it easier to map the tensors provided to the custom op to the ngraph::Executable inputs.

@tomdol tomdol requested a review from a team as a code owner September 3, 2019 19:13
@jywu-msft
Copy link
Copy Markdown
Member

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 21 pipeline(s), but failed to run 1 pipeline(s).

@jywu-msft jywu-msft merged commit 4ed8d4b into microsoft:master Sep 3, 2019
@tomdol tomdol deleted the tomdol/cluster_inputs_reorder branch September 9, 2019 15:29
yuslepukhin pushed a commit that referenced this pull request Mar 17, 2026
## Describe your changes

Use ONNX IR in graph surgeries to replace some proto manipulation. This
PR adds a `call_ir` in the base class that is called when `__call__` is
not overriden. This way the changes can be incremental and compatible
with existing usages of the `Surgeon` class.

Refactoring:
- Renamed the Surgeon class that operates on proto to ProtoSurgeon to
make the intention clear. Developers can subclass ProtoSurgeon to
operate on proto and subclass Surgion to transform graphs directly with
IR.

## Checklist before requesting a review
- [ ] Add unit tests for this change.
- [x] Make sure all tests can pass.
- [x] Update documents if necessary.
- [x] Lint and apply fixes to your code by running `lintrunner -a`
- [ ] Is this a user-facing change? If yes, give a description of this
change to be included in the release notes.
- [ ] Is this PR including examples changes? If yes, please remember to
update [example
documentation](https://github.com/microsoft/Olive/blob/main/docs/source/examples.md)
in a follow-up PR.

## (Optional) Issue link
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants