forked from apache/mxnet
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move storage type vector from nnvm to mxnet (apache#7054)
* move storage type vector from nnvm to mxnet * update nnvm * update nnvm
- Loading branch information
1 parent
4c3e8b5
commit cf5747b
Showing
8 changed files
with
53 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/*! | ||
* Copyright (c) 2016 by Contributors | ||
* \file graph_attr_types.h | ||
* \brief Data structures that can appear in graph attributes. | ||
*/ | ||
#ifndef MXNET_GRAPH_ATTR_TYPES_H_ | ||
#define MXNET_GRAPH_ATTR_TYPES_H_ | ||
|
||
#include <vector> | ||
|
||
namespace mxnet { | ||
|
||
/*! | ||
* \brief The result holder of storage type of each NodeEntry in the graph. | ||
* \note Stored under graph.attrs["storage_type"], provided by Pass "InferStorageType" | ||
* | ||
* \code | ||
* Graph g = ApplyPass(src_graph, "InferStorageType"); | ||
* const StorageVector& stypes = g.GetAttr<StorageTypeVector>("storage_type"); | ||
* // get shape by entry id | ||
* int entry_type = stypes[g.indexed_graph().entry_id(my_entry)]; | ||
* \endcode | ||
* | ||
* \sa FInferStorageType | ||
*/ | ||
using StorageTypeVector = std::vector<int>; | ||
|
||
} // namespace mxnet | ||
|
||
#endif // MXNET_GRAPH_ATTR_TYPES_H_ |
Submodule nnvm
updated
11 files
+1 −1 | include/nnvm/base.h | |
+0 −15 | include/nnvm/graph_attr_types.h | |
+12 −2 | include/nnvm/op_attr_types.h | |
+8 −21 | include/nnvm/pass_functions.h | |
+3 −3 | include/nnvm/tuple.h | |
+1 −0 | src/core/node.cc | |
+1 −0 | src/core/symbolic.cc | |
+32 −2 | src/pass/gradient.cc | |
+4 −25 | src/pass/infer_shape_type.cc | |
+50 −20 | src/pass/plan_memory.cc | |
+0 −2 | tests/python/test_graph.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters