diff --git a/src/executor/graph_executor.cc b/src/executor/graph_executor.cc index 53b5941778c9..28862a49fae1 100644 --- a/src/executor/graph_executor.cc +++ b/src/executor/graph_executor.cc @@ -1522,7 +1522,8 @@ static nnvm::Symbol PartitionGraph(const nnvm::Symbol& src, auto full_name = subgraph_prop->HasAttr("property_name") ? subgraph_prop->GetAttr("property_name") : prop_name; - LOG(INFO) << "Skip subgraph " << full_name << " as it requires `grad_req=null`."; + LOG(INFO) << "skip partitioning graph with subgraph property " << full_name + << " as it requires `grad_req=null`."; continue; } } diff --git a/src/operator/subgraph/subgraph_property.h b/src/operator/subgraph/subgraph_property.h index 813fbd34f63a..bbbf4e49ac2a 100644 --- a/src/operator/subgraph/subgraph_property.h +++ b/src/operator/subgraph/subgraph_property.h @@ -204,13 +204,13 @@ class SubgraphPropertyRegistry { typedef dmlc::ThreadLocalStore>> SubgraphPropertyOpNameSet; -#define DECLAREPROPERTY1(NAME, SubgraphPropertyType, X) \ - DMLC_ATTRIBUTE_UNUSED auto __make_##SubgraphPropertyType##_##Name##_##X##__ -#define DECLAREPROPERTY(NAME, SubgraphPropertyType, X) \ - DECLAREPROPERTY1(NAME, SubgraphPropertyType, X) +#define DECLARE_PROPERTY_EX(NAME, SubgraphPropertyType, X) \ + const static DMLC_ATTRIBUTE_UNUSED auto __make_##SubgraphPropertyType##_##Name##_##X##__ +#define DECLARE_PROPERTY(NAME, SubgraphPropertyType, X) \ + DECLARE_PROPERTY_EX(NAME, SubgraphPropertyType, X) #define MXNET_REGISTER_SUBGRAPH_PROPERTY(Name, SubgraphPropertyType) \ - static DECLAREPROPERTY(Name, SubgraphPropertyType, __LINE__) = \ + DECLARE_PROPERTY(Name, SubgraphPropertyType, __LINE__) = \ SubgraphPropertyRegistry::Get()->__REGISTER__(#Name, &SubgraphPropertyType::Create) } // namespace op