diff options
Diffstat (limited to 'tensorflow/core/grappler/costs/virtual_scheduler.h')
-rw-r--r-- | tensorflow/core/grappler/costs/virtual_scheduler.h | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/tensorflow/core/grappler/costs/virtual_scheduler.h b/tensorflow/core/grappler/costs/virtual_scheduler.h index 0e66e8a463..bead84af29 100644 --- a/tensorflow/core/grappler/costs/virtual_scheduler.h +++ b/tensorflow/core/grappler/costs/virtual_scheduler.h @@ -107,10 +107,10 @@ struct DeviceState { mem_usage_snapshot_at_peak; Costs device_costs; - std::map<string, Costs> op_to_cost; // Per-op cost. - std::map<string, int64> op_to_memory; // Per-op memory usage at peak usage. - int64 memory_usage; - int64 max_memory_usage; + std::map<string, Costs> op_to_cost; // Per-op cost. + + int64 memory_usage; // Current temporary memory usage + int64 max_memory_usage; // Max temporary memory usage DeviceState() { device_costs = Costs::ZeroCosts(); @@ -283,13 +283,6 @@ class VirtualScheduler { return &node_map_; } - protected: - // Returns the size of output at port_num (unit: bytes). A special case is - // port_num -1, which is for control dependency and assumed to be 4 bytes. - int64 CalculateOutputSize( - const std::vector<OpInfo::TensorProperties>& output_properties, - const int port_num) const; - private: // Constants. const string kAttrInputSrc = "input_source_"; @@ -321,8 +314,11 @@ class VirtualScheduler { std::vector<std::unique_ptr<NodeDef>> additional_nodes_; // Stats: - std::map<string, int> op_counts_; // Op counts with key with input shape. - // Individual op costs (with input shapes). + // Op counts with key with input shape. + // Example key: "[Op=AssignSub, input_shapes=[[7,1,160,160][7,1,160,160]]" + std::map<string, int> op_counts_; + // Individual op costs with key with input shape. + // Integer field for execution time in micro seconds. // Boolean field for whether the cost is accurate. std::map<string, std::pair<int, bool>> op_costs_; |