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

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
reminisce committed Jun 23, 2017
1 parent 220687e commit bcf9676
Showing 1 changed file with 1 addition and 22 deletions.
23 changes: 1 addition & 22 deletions src/executor/infer_graph_attr_pass.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,6 @@
namespace mxnet {
namespace exec {

template<typename AttrType>
nnvm::Graph InitAttrVector(nnvm::Graph&& g,
const std::string& attr_input_name,
std::vector<AttrType>* attr_vec) {
const AttrVector& attr_args= g.GetAttr<AttrVector>(attr_input_name);
CHECK_LE(attr_args.size(), idx.input_nodes().size())
<< "More provided shapes than number of arguments.";
for (size_t i = 0; i < attr_args.size(); ++i) {
(*attr_vec)[idx.entry_id(idx.input_nodes()[i], 0)] = attr_args[i];
}

// specialize for attr_input_name = "storage_type_inputs"
// populate ctx for
if (attr_input_name == "storage_type_inputs") {
}

// erase the provided arguments
g.attrs.erase(attr_input_name);
return g;
}

template<typename AttrType, typename IsNone, typename FDefault>
nnvm::Graph InferAttr(nnvm::Graph &&ret,
const AttrType empty_val,
Expand Down Expand Up @@ -66,7 +45,7 @@ nnvm::Graph InferAttr(nnvm::Graph &&ret,
if (ret.attrs.count(input_name) != 0) {
const AttrVector& shape_args = ret.GetAttr<AttrVector>(input_name);
CHECK_LE(shape_args.size(), idx.input_nodes().size())
<< "More provided shapes than number of arguments.";
<< "More provided " << attr_name << "s than number of arguments.";
for (size_t i = 0; i < shape_args.size(); ++i) {
rshape[idx.entry_id(idx.input_nodes()[i], 0)] = shape_args[i];
}
Expand Down

0 comments on commit bcf9676

Please sign in to comment.