You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2019/08/15 06:42:16 UTC
[GitHub] [incubator-mxnet] samskalicky commented on issue #15886: [WIP]
Graph Partition API
samskalicky commented on issue #15886: [WIP] Graph Partition API
URL: https://github.com/apache/incubator-mxnet/pull/15886#issuecomment-521533902
@ZhennanQin Here in this PR we're trying to do the following things:
1. Clarify the API/function-names. Initially we wanted the API to be called "sym.partition" since we were going to partition the symbol. But given the latest PR that enables multiple subgraph properties to be specified we dropped this idea. Instead, to users the outcome is that they are "optimizing the symbol, for a specific backend". So now we propose the API to be called "optimizeFor" and it will take the name of the backend. So this way it will be much more understandable to users that they are "optimizing the symbol for a specific backend". For example: sym.optimizeFor("TensorRT") or sym.optimizeFor("MKLDNN") or sym.optimizeFor("EIA"). We expect that users could call this more than once for the same model. For example, users could first optimize for EIA (that would group supported nodes into subgraphs) and then optimize for MKLDNN for the remaining nodes that were not partitioned into subgraphs.
2. We also want to enable users to pass more configuration options directly to the subgraph property to tailor the partitioning. One example is to provide a better experience for users to provide a blacklist (or list of operators to exclude from subgraphs). Another could be setting the minimum number of nodes allowed in a subgraph (ie. 3).
3. Enable the API to optionally perform shape/type propagation before partitioning. For example, some backends may only support operators if their inputs are a particular type (ie. FP16 or Int8) or shape (2D, 3D, or 4D).
4. Currently the subgraph properties are state-less. We want to enable the subgraph properties to have a prepartition and postpartition APIs to do setup or cleanup around the actual partitioning call. This could be used to setup a whitelist of supported operators, or pre-analyze the graph before partitioning begins and Select is called on the Selector.
In this PR we want to enable this functionality for users to more easily use partitioning. In a later PR we want to enable subgraph properties to be dynamically loaded from libraries.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services