1 #ifndef CAFFE2_CORE_NET_DAG_UTILS_H_     2 #define CAFFE2_CORE_NET_DAG_UTILS_H_     9 #include <unordered_map>    10 #include <unordered_set>    13 #include "c10/util/Registry.h"    14 #include "caffe2/core/blob.h"    15 #include "caffe2/core/common.h"    16 #include "caffe2/core/logging.h"    17 #include "caffe2/core/net.h"    18 #include "caffe2/core/observer.h"    19 #include "caffe2/core/operator_schema.h"    20 #include "caffe2/core/tensor.h"    21 #include "caffe2/core/workspace.h"    22 #include "caffe2/proto/caffe2_pb.h"    23 #include "caffe2/utils/simple_queue.h"    29   unique_ptr<OperatorBase> operator_;
    30   vector<int> children_;
    32   std::atomic<int> runtime_parent_count_;
    33   bool is_chain_start_ = 
false;
    34   std::atomic_flag scheduled_ = ATOMIC_FLAG_INIT;
    38   vector<int> children_;
    40   int visited_inputs = 0;
    44 using ExecutionChains = std::unordered_map<int, std::vector<int>>;
    46 C10_EXPORT ExecutionChains computeChains(std::vector<OperatorNode>& orig_nodes);
    54 C10_EXPORT ExecutionChains computeGroups(std::vector<OperatorNode>& orig_nodes);
    56 C10_EXPORT ExecutionChains singleChains(std::vector<OperatorNode>& nodes);
    58 C10_EXPORT std::vector<OperatorNode> prepareOperatorNodes(
    59     const std::shared_ptr<const NetDef>& net_def,
    62 std::vector<OpGraphNode> prepareChainGraphNodes(
    63     const std::vector<dag_utils::OperatorNode>& operator_nodes,
    64     const std::vector<std::vector<int>>& execution_chains);
    69 #endif // CAFFE2_CORE_NET_DAG_UTILS_H_ Workspace is a class that holds all the related objects created during runtime: (1) all blobs...
 
A global dictionary that holds information about what Caffe2 modules have been loaded in the current ...