ZhennanQin commented on a change in pull request #12530: Implement mkldnn convolution fusion and quantization. URL: https://github.com/apache/incubator-mxnet/pull/12530#discussion_r223906681
########## File path: src/executor/graph_executor.cc ########## @@ -1561,15 +1561,32 @@ static nnvm::Symbol PartitionGraph(const nnvm::Symbol& src, } else { CHECK(i1 < arg_names.size()); CHECK_EQ(arg_names[i1], input_names[i]); - arg_shapes.push_back(in_args[i1].shape()); - arg_dtypes.push_back(in_args[i1].dtype()); - arg_stypes.push_back(in_args[i1].storage_type()); - in_arg_ctxes[i1] = in_args[i1].ctx(); + arg_shapes.push_back(in_args->at(i1).shape()); + arg_dtypes.push_back(in_args->at(i1).dtype()); + arg_stypes.push_back(in_args->at(i1).storage_type()); + in_arg_ctxes[i1] = in_args->at(i1).ctx(); ++i1; } } - return PartitionGraph(src, prop_name, arg_shapes, arg_dtypes, arg_stypes, - default_ctx, ctx_map, in_arg_ctxes, aux_state_ctxes); + + // setup in_args_map + std::unordered_map<std::string, NDArray> in_args_map; + for (size_t i = 0; i < in_args->size(); ++i) { + in_args_map[arg_names[i]] = in_args->at(i); Review comment: @mbrookhart I think MXNet requires inputs with unique names, otherwise, how to distinguish the inputs with same names? According to symbol.bind API: **args (list of NDArray or dict of str to NDArray) Input arguments to the symbol. If the input type is a list of NDArray, the order should be same as the order of list_arguments(). If the input type is a dict of str to NDArray, then it maps the name of arguments to the corresponding NDArray. In either case, all the arguments must be provided.** So basically, name is the only id for each input. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on 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