eric-haibin-lin commented on a change in pull request #17034: Dynamic subgraph
property
URL: https://github.com/apache/incubator-mxnet/pull/17034#discussion_r363534787
##########
File path: include/mxnet/lib_api.h
##########
@@ -590,6 +592,52 @@ class CustomOp {
bool isSGop;
};
+/*! \brief Custom Subgraph Create function template */
+typedef MXReturnValue (*supportedOps_t)(std::string, int, int*,
+ std::unordered_map<std::string,
std::string>&);
+typedef MXReturnValue (*acceptSubgraph_t)(std::string, int, bool*,
+ std::unordered_map<std::string,
std::string>&,
+ std::unordered_map<std::string,
std::string>&);
+
+/*!
+ * \brief An abstract class for subgraph property
+ */
+class CustomPartitioner {
+ public:
+ CustomPartitioner() : name("ERROR") {}
+ explicit CustomPartitioner(const char* backend_name) :
+ name(backend_name) {}
+ CustomPartitioner& addStrategy(const char* prop_name,
Review comment:
Could you add some code in the doc about what addStrategy and
setAcceptSubgraph are for (copy paste what you said on the PR?)
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services