anirudh2290 commented on a change in pull request #16654: Multithreaded
Inference Support
URL: https://github.com/apache/incubator-mxnet/pull/16654#discussion_r366074605
##########
File path: src/imperative/cached_op.h
##########
@@ -26,8 +26,195 @@
#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 they Symbol */
+void CreateForwardGraph(const nnvm::Symbol &sym, nnvm::Graph *fwd_graph) {
+ using namespace nnvm;
+ static const auto _copy_op = Op::Get("_copy");
+ {
Review comment:
this was part of a refactor in this pr. earlier this whole chunk of code was
called directly from forward of cached op. The braces are not needed here. I
have removed it.
----------------------------------------------------------------
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