Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Enhance subgraph API #14113

Merged
merged 18 commits into from
Mar 31, 2019
Merged

Enhance subgraph API #14113

merged 18 commits into from
Mar 31, 2019

Conversation

ZhennanQin
Copy link
Contributor

@ZhennanQin ZhennanQin commented Feb 11, 2019

@reminisce @zheng-da @apeforest @szha @pengzhao-intel
PR Major change:

  • Introduce SubgraphSelectorV2 that accepts BiDirectedNode instead of nnvm::Node to get full context of visited node. BiDirectedNode is double linked version of nnvm::Node, which can list the output consumer of node. This is very useful to help make selection which has output requirement. Wrapper class SubgraphSelectorV2Bridge is added to convert SubgraphSelector to SubgraphSelectorV2, which allows developer to continue using old SubgraphSelector. So this feature is fully back-compatible.

  • Introduce kAdjust mode for SubgraphProperty to allow adjusting network parameters instead of create new node. New API AdjustSubgraphNode() is added to SubgraphProperty for this, which can adjust selected nodes attributes. This is useful when we don't want to create new subgraph node, but to do some modification on selected nodes. Quantized scale alignment optimization is pending on this feature.

  • Change the behavior of PartitionGraph to create single subgraph node for nodes isolating with each other. https://cwiki.apache.org/confluence/display/MXNET/Enable+Operator+Level+Parallelism+under+Subgraph is depending on this change.

  • Add new subgraph pass "quantized scale alignment optimization" as an example for new subgraph API.

Checklist

Essentials

Please feel free to remove inapplicable items for your PR.

  • The PR title starts with [MXNET-$JIRA_ID], where $JIRA_ID refers to the relevant JIRA issue created (except PRs with tiny changes)
  • Changes are complete (i.e. I finished coding on this PR)
  • All changes have test coverage:
  • Unit tests are added for small changes to verify correctness (e.g. adding a new operator)
  • Nightly tests are added for complicated/long-running ones (e.g. changing distributed kvstore)
  • Build tests will be added for build configuration changes (e.g. adding a new build option with NCCL)
  • Code is well-documented:
  • For user-facing API changes, API doc string has been updated.
  • For new C++ functions in header files, their functionalities and arguments are documented.
  • For new examples, README.md is added to explain the what the example does, the source of the dataset, expected performance on test set and reference to the original paper if applicable
  • Check the API doc at http:https://mxnet-ci-doc.s3-accelerate.dualstack.amazonaws.com/PR-$PR_ID/$BUILD_ID/index.html
  • To the my best knowledge, examples are either not affected by this change, or have been fixed to be compatible with this change

@pengzhao-intel
Copy link
Contributor

@KellenSunderland @TaoLv

@szha szha requested a review from zheng-da February 11, 2019 06:00
@vandanavk
Copy link
Contributor

@mxnet-label-bot add [pr-awaiting-review, Operator]

@marcoabreu marcoabreu added Operator pr-awaiting-review PR is waiting for code review labels Feb 11, 2019
@vandanavk
Copy link
Contributor

@ZhennanQin could you re-trigger the CI?

@karan6181
Copy link
Contributor

@ZhennanQin Could you please re-trigger the CI and see why some of the checks are still waiting? Thanks !

@pengzhao-intel
Copy link
Contributor

@anirudh2290 @reminisce please help review the continuous improvements for subgraph after #14277

src/operator/subgraph/build_subgraph.cc Outdated Show resolved Hide resolved
src/operator/subgraph/build_subgraph.cc Outdated Show resolved Hide resolved
src/operator/subgraph/build_subgraph.cc Outdated Show resolved Hide resolved
src/operator/subgraph/build_subgraph.cc Outdated Show resolved Hide resolved
src/operator/subgraph/build_subgraph.cc Outdated Show resolved Hide resolved
@pengzhao-intel
Copy link
Contributor

@ZhennanQin @xinyu-intel please resolve the comments and re-trigger the PR.
We need to speedup the progress of this changes :)

Copy link
Contributor

@pengzhao-intel pengzhao-intel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

The change is used internally for a while and both performance and accuracy is verified.

@pengzhao-intel
Copy link
Contributor

Thanks for your contribution. Merging now.

@pengzhao-intel pengzhao-intel merged commit 8c2a25f into apache:master Mar 31, 2019
vdantu pushed a commit to vdantu/incubator-mxnet that referenced this pull request Mar 31, 2019
* Enhance subgraph API

* Fix lint

* Trigger CI

* Fix test

* split into another PR

* Rename partition_graph to build_graph

* Fix lint

* Fix merge

* run CI

* run CI

* fix quantize script

* fix ssd script

* Address reminisce comment
ZhennanQin added a commit to ZhennanQin/incubator-mxnet that referenced this pull request Apr 3, 2019
* Enhance subgraph API

* Fix lint

* Trigger CI

* Fix test

* split into another PR

* Rename partition_graph to build_graph

* Fix lint

* Fix merge

* run CI

* run CI

* fix quantize script

* fix ssd script

* Address reminisce comment
nswamy pushed a commit that referenced this pull request Apr 5, 2019
* Enhance subgraph API

* Fix lint

* Trigger CI

* Fix test

* split into another PR

* Rename partition_graph to build_graph

* Fix lint

* Fix merge

* run CI

* run CI

* fix quantize script

* fix ssd script

* Address reminisce comment
haohuanw pushed a commit to haohuanw/incubator-mxnet that referenced this pull request Jun 23, 2019
* Enhance subgraph API

* Fix lint

* Trigger CI

* Fix test

* split into another PR

* Rename partition_graph to build_graph

* Fix lint

* Fix merge

* run CI

* run CI

* fix quantize script

* fix ssd script

* Address reminisce comment
@ZhennanQin ZhennanQin deleted the subgraph_v2 branch September 16, 2019 07:01
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Operator pr-awaiting-review PR is waiting for code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants