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

Commit

Permalink
Address comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhennanQin committed Mar 23, 2019
1 parent 0c4e1a7 commit 4d38cd6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion src/executor/graph_executor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1522,7 +1522,8 @@ static nnvm::Symbol PartitionGraph(const nnvm::Symbol& src,
auto full_name = subgraph_prop->HasAttr("property_name")
? subgraph_prop->GetAttr<std::string>("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;
}
}
Expand Down
10 changes: 5 additions & 5 deletions src/operator/subgraph/subgraph_property.h
Original file line number Diff line number Diff line change
Expand Up @@ -204,13 +204,13 @@ class SubgraphPropertyRegistry {
typedef dmlc::ThreadLocalStore<std::unordered_map<std::string, std::unordered_set<std::string>>>
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
Expand Down

0 comments on commit 4d38cd6

Please sign in to comment.