ZhennanQin commented on a change in pull request #14277: Enhance PartitionGraph
URL: https://github.com/apache/incubator-mxnet/pull/14277#discussion_r264104851
 
 

 ##########
 File path: src/operator/subgraph/subgraph_property.h
 ##########
 @@ -200,7 +197,7 @@ typedef 
dmlc::ThreadLocalStore<std::unordered_map<std::string, std::unordered_se
 
 #define MXNET_REGISTER_SUBGRAPH_PROPERTY(Name, SubgraphPropertyType) \
   static DMLC_ATTRIBUTE_UNUSED auto __make_ ## SubgraphPropertyType ## _ ## 
Name ## __ = \
-    SubgraphPropertyRegistry::Get()->__REGISTER_OR_GET__(#Name, 
&SubgraphPropertyType::Create)
+    SubgraphPropertyRegistry::Get()->__REGISTER__(#Name, 
&SubgraphPropertyType::Create)
 
 Review comment:
   Basically, the main change here is, replace `std::unordered_map<std::string, 
SubgraphPropertyCreateFn>` with `std::unordered_map<std::string, 
std::vector<SubgraphPropertyCreateFn>>`  as the type of prop_fn_map_. 
   Using `std::vector` instead of `unoredered_map`  as the inner type because, 
we need to keep `SubgraphPropertyCreateFn` in a user defined order, while 
unoredered_map can't guarantee it. 

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to