larroy commented on a change in pull request #16654: Multithreaded Inference
Support
URL: https://github.com/apache/incubator-mxnet/pull/16654#discussion_r366090803
##########
File path: src/imperative/cached_op.h
##########
@@ -26,8 +26,191 @@
#include <utility>
#include <string>
#include <unordered_map>
+#include <map>
+#include "../operator/operator_common.h"
+#include "../operator/subgraph/common.h"
+#include "./imperative_utils.h"
namespace mxnet {
+namespace {
+
+ static const char FULL[] = "full";
+ static const char FORWARD[] = "forward";
+ static const char BACKWARD[] = "backward";
+ static const char REF_COUNT[] = "ref_count";
+ static const char MEM_PLAN[] = "mem_plan";
+ static const char STORAGE_PLAN[] = "storage_plan";
+
+std::string AddPrefix(const std::string& prefix,
+ const std::string& s) {
+ return prefix + "_" + s;
+}
+
+/* \brief create a forward graph from the Symbol */
+void CreateForwardGraph(const nnvm::Symbol &sym, nnvm::Graph *fwd_graph) {
+ using namespace nnvm;
+ static const auto _copy_op = Op::Get("_copy");
+ NodeEntryMap<size_t> dedup_out;
Review comment:
Why this needs to map to size_t when you are treating just as a set?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services