Home
last modified time | relevance | path

Searched refs:Costs (Results 1 – 25 of 52) sorted by relevance

123

/external/tensorflow/tensorflow/core/grappler/costs/
Dcost_estimator_test.cc25 Costs c = Costs::ZeroCosts(); in TEST()
26 c.execution_time = Costs::NanoSeconds(1); in TEST()
27 c.compute_time = Costs::NanoSeconds(2); in TEST()
28 c.memory_time = Costs::NanoSeconds(3); in TEST()
29 c.intermediate_memory_time = Costs::NanoSeconds(4); in TEST()
30 c.intermediate_memory_read_time = Costs::NanoSeconds(5); in TEST()
31 c.intermediate_memory_write_time = Costs::NanoSeconds(6); in TEST()
39 Costs sum = CombineCosts(c, c); in TEST()
41 EXPECT_EQ(sum.execution_time, Costs::NanoSeconds(2)); in TEST()
42 EXPECT_EQ(sum.compute_time, Costs::NanoSeconds(4)); in TEST()
[all …]
Dop_level_cost_estimator_test.cc59 void ExpectZeroCost(const Costs& cost) { in ExpectZeroCost()
61 EXPECT_EQ(cost.compute_time, Costs::Duration::zero()); in ExpectZeroCost()
62 EXPECT_EQ(cost.execution_time, Costs::Duration::zero()); in ExpectZeroCost()
63 EXPECT_EQ(cost.memory_time, Costs::Duration::zero()); in ExpectZeroCost()
515 Costs PredictCosts(const OpContext& op_context) const { in PredictCosts()
641 EXPECT_EQ(Costs::Duration(0), cost.memory_time); in TEST_F()
642 EXPECT_EQ(Costs::Duration(1), cost.compute_time); in TEST_F()
643 EXPECT_EQ(Costs::Duration(1), cost.execution_time); in TEST_F()
666 EXPECT_EQ(Costs::Duration(130), cost.memory_time); in TEST_F()
667 EXPECT_EQ(Costs::Duration(16), cost.compute_time); in TEST_F()
[all …]
Dcost_estimator.h72 struct Costs { struct
74 inline Costs();
77 static inline Costs ZeroCosts(bool inaccurate = false);
168 inline std::ostream& operator<<(std::ostream& os, const Costs::MilliSeconds d) { argument
172 inline std::ostream& operator<<(std::ostream& os, const Costs::MicroSeconds d) {
176 inline std::ostream& operator<<(std::ostream& os, const Costs::NanoSeconds d) {
181 Costs::Costs() { in Costs() function
193 Costs Costs::ZeroCosts(bool inaccurate) { in ZeroCosts()
194 Costs costs; in ZeroCosts()
208 Costs CombineCosts(const Costs& left, const Costs& right);
[all …]
Dvirtual_scheduler.h62 Costs::Duration time_ready;
63 Costs::Duration time_scheduled;
64 Costs::Duration time_finished;
67 std::unordered_map<int, Costs::Duration> time_no_references;
80 Costs node_costs; // Node costs per execution
81 Costs TotalNodeCosts() const { in TotalNodeCosts()
92 time_ready = Costs::Duration::max(); in NodeState()
93 time_scheduled = Costs::Duration::max(); in NodeState()
94 time_finished = Costs::Duration::max(); in NodeState()
128 Costs device_costs;
[all …]
Dcost_estimator.cc21 Costs CombineCosts(const Costs& left, const Costs& right) { in CombineCosts()
26 Costs result = left; in CombineCosts()
58 Costs MultiplyCosts(const Costs& costs, int multiplier) { in MultiplyCosts()
61 return Costs::ZeroCosts(); in MultiplyCosts()
67 Costs result = costs; in MultiplyCosts()
Dmeasuring_cost_estimator.cc55 Costs* costs) const { in PredictCosts()
69 const Costs::MicroSeconds start = Env::Default()->NowMicros(); in PredictCosts()
89 const Costs::MicroSeconds finish = Env::Default()->NowMicros(); in PredictCosts()
120 costs->execution_time = Costs::Duration::max(); in PredictCosts()
140 costs->execution_time = Costs::Duration::max(); in PredictCosts()
147 costs->execution_time = Costs::Duration(stats.mean()); in PredictCosts()
Dvirtual_scheduler.cc56 Costs& FindOrCreateZero(const string& op_name, in FindOrCreateZero()
57 std::map<string, Costs>* op_cost) { in FindOrCreateZero()
62 it = op_cost->emplace(op_name, Costs::ZeroCosts()).first; in FindOrCreateZero()
299 std::vector<std::pair<const NodeDef*, Costs::Duration>> candidates; in GetCurrNode()
317 [](const std::pair<const NodeDef*, Costs::Duration>& a, in GetCurrNode()
318 const std::pair<const NodeDef*, Costs::Duration>& b) { in GetCurrNode()
388 : graph_costs_(Costs::ZeroCosts()), in SchedulerState()
410 graph_costs_ = Costs::ZeroCosts(); in Init()
555 curr_node_state.time_ready = Costs::Duration(); in Init()
808 node_state.time_no_references[i] = Costs::Duration::max(); in GetNodeStateOrCreateIt()
[all …]
Dgraph_memory.cc191 Costs::MicroSeconds(node_stats.all_start_micros()); in InferFromTrace()
194 live->deallocation_time = std::max<Costs::Duration>( in InferFromTrace()
196 Costs::NanoSeconds(1) + in InferFromTrace()
197 Costs::MicroSeconds(node_stats.all_start_micros() + in InferFromTrace()
235 live->deallocation_time = std::max<Costs::Duration>( in InferFromTrace()
237 Costs::NanoSeconds(1) + in InferFromTrace()
238 Costs::MicroSeconds(node_stats.all_start_micros() + in InferFromTrace()
Danalytical_cost_estimator.cc40 int node_id, const Costs& node_costs, in AddCostNode()
153 Costs* costs) const { in PredictCosts()
170 costs->execution_time = Costs::Duration::max(); in PredictCosts()
191 Costs node_costs; in PredictCosts()
Dgraph_memory.h35 Costs::Duration allocation_time;
36 Costs::Duration deallocation_time;
Dop_level_cost_estimator.h88 Costs costs;
96 virtual Costs PredictCosts(const OpContext& op_context) const;
105 Costs PredictOpCountBasedCost(double operations, const OpInfo& op_info) const;
110 Costs PredictOpCountBasedCost(double operations, double input_io_bytes,
Danalytical_cost_estimator_test.cc102 Costs summary; in TEST_F()
105 EXPECT_EQ(Costs::NanoSeconds(9158), summary.execution_time); in TEST_F()
Dmeasuring_cost_estimator.h62 RunMetadata* run_metadata, Costs* cost) const override;
Danalytical_cost_estimator.h65 RunMetadata* run_metadata, Costs* cost) const override;
/external/tensorflow/tensorflow/core/grappler/optimizers/
Dstatic_schedule_test.cc50 std::vector<Costs::NanoSeconds> GetOrderedTimes( in GetOrderedTimes()
51 const std::unordered_map<const NodeDef*, Costs::NanoSeconds> in GetOrderedTimes()
53 std::map<Costs::NanoSeconds, std::string> ordered_completion_times; in GetOrderedTimes()
59 std::vector<Costs::NanoSeconds> ordered_times; in GetOrderedTimes()
69 const std::unordered_map<const NodeDef*, Costs::NanoSeconds> in GetOrderedNodeNames()
71 std::map<Costs::NanoSeconds, std::string> ordered_completion_times; in GetOrderedNodeNames()
93 std::unordered_map<const NodeDef*, Costs::NanoSeconds> completion_times; in TEST_F()
101 std::vector<Costs::NanoSeconds> ordered_times = in TEST_F()
108 EXPECT_EQ(ordered_times[0], Costs::NanoSeconds(1)); in TEST_F()
138 std::unordered_map<const NodeDef*, Costs::NanoSeconds> completion_times; in TEST_F()
[all …]
Dstatic_schedule.cc32 static Costs::NanoSeconds PredictExecutionTime( in PredictExecutionTime()
54 Costs::NanoSeconds estimate = in PredictExecutionTime()
58 return std::max(estimate, Costs::NanoSeconds(1)); in PredictExecutionTime()
63 std::unordered_map<const NodeDef*, Costs::NanoSeconds>* completion_times) { in EstimateEarliestExecutionTimes()
108 Costs::NanoSeconds execution_time = in EstimateEarliestExecutionTimes()
110 Costs::NanoSeconds completion_time = in EstimateEarliestExecutionTimes()
124 Costs::NanoSeconds ready_time = in EstimateEarliestExecutionTimes()
135 const std::unordered_map<const NodeDef*, Costs::NanoSeconds>& in EstimateRequiredTimes()
137 std::unordered_map<const NodeDef*, Costs::NanoSeconds>* required_times) { in EstimateRequiredTimes()
141 (*required_times)[&node] = Costs::NanoSeconds::max(); in EstimateRequiredTimes()
[all …]
Dstatic_schedule.h36 std::unordered_map<const NodeDef*, Costs::NanoSeconds>* execution_times);
43 const std::unordered_map<const NodeDef*, Costs::NanoSeconds>&
45 std::unordered_map<const NodeDef*, Costs::NanoSeconds>* required_times);
Dmemory_optimizer.cc802 Costs::NanoSeconds time_to_swap = 0;
808 const std::unordered_map<const NodeDef*, Costs::NanoSeconds>& in FindSwapInTrigger()
813 Costs::NanoSeconds max_trigger_time(0); in FindSwapInTrigger()
841 std::map<Costs::NanoSeconds, const NodeDef*> candidates; in FindSwapInTrigger()
925 const std::unordered_map<const NodeDef*, Costs::NanoSeconds>& in FindSwapOutTrigger()
939 Costs::NanoSeconds earliest_fanout(Costs::NanoSeconds::infinity()); in FindSwapOutTrigger()
1014 std::unordered_map<string, Costs::NanoSeconds> op_completion_times; in IdentifySwappingCandidates()
1031 Costs::NanoSeconds exec_time = in IdentifySwappingCandidates()
1032 Costs::NanoSeconds(1) + in IdentifySwappingCandidates()
1033 Costs::MicroSeconds(node_stats.all_start_micros() + in IdentifySwappingCandidates()
[all …]
/external/llvm/include/llvm/CodeGen/PBQP/
DGraph.h74 NodeEntry(VectorPtr Costs) : Costs(std::move(Costs)) {} in NodeEntry() argument
96 VectorPtr Costs; variable
104 EdgeEntry(NodeId N1Id, NodeId N2Id, MatrixPtr Costs) in EdgeEntry() argument
105 : Costs(std::move(Costs)) { in EdgeEntry()
116 Costs = nullptr; in invalidate()
168 MatrixPtr Costs; variable
382 NodeId addNode(OtherVectorT Costs) { in addNode() argument
384 VectorPtr AllocatedCosts = CostAlloc.getVector(std::move(Costs)); in addNode()
403 NodeId addNodeBypassingCostAllocator(OtherVectorPtrT Costs) { in addNodeBypassingCostAllocator() argument
404 NodeId NId = addConstructedNode(NodeEntry(Costs)); in addNodeBypassingCostAllocator()
[all …]
/external/swiftshader/third_party/llvm-10.0/llvm/include/llvm/CodeGen/PBQP/
DGraph.h68 NodeEntry(VectorPtr Costs) : Costs(std::move(Costs)) {} in NodeEntry() argument
94 VectorPtr Costs; variable
103 EdgeEntry(NodeId N1Id, NodeId N2Id, MatrixPtr Costs) in EdgeEntry() argument
104 : Costs(std::move(Costs)) { in EdgeEntry()
152 MatrixPtr Costs; variable
375 NodeId addNode(OtherVectorT Costs) { in addNode() argument
377 VectorPtr AllocatedCosts = CostAlloc.getVector(std::move(Costs)); in addNode()
396 NodeId addNodeBypassingCostAllocator(OtherVectorPtrT Costs) { in addNodeBypassingCostAllocator() argument
397 NodeId NId = addConstructedNode(NodeEntry(Costs)); in addNodeBypassingCostAllocator()
409 EdgeId addEdge(NodeId N1Id, NodeId N2Id, OtherVectorT Costs) { in addEdge() argument
[all …]
/external/llvm-project/llvm/include/llvm/CodeGen/PBQP/
DGraph.h68 NodeEntry(VectorPtr Costs) : Costs(std::move(Costs)) {} in NodeEntry() argument
94 VectorPtr Costs; variable
103 EdgeEntry(NodeId N1Id, NodeId N2Id, MatrixPtr Costs) in EdgeEntry() argument
104 : Costs(std::move(Costs)) { in EdgeEntry()
152 MatrixPtr Costs; variable
375 NodeId addNode(OtherVectorT Costs) { in addNode() argument
377 VectorPtr AllocatedCosts = CostAlloc.getVector(std::move(Costs)); in addNode()
396 NodeId addNodeBypassingCostAllocator(OtherVectorPtrT Costs) { in addNodeBypassingCostAllocator() argument
397 NodeId NId = addConstructedNode(NodeEntry(Costs)); in addNodeBypassingCostAllocator()
409 EdgeId addEdge(NodeId N1Id, NodeId N2Id, OtherVectorT Costs) { in addEdge() argument
[all …]
/external/llvm-project/llvm/lib/CodeGen/
DRegAllocPBQP.cpp483 PBQPRAGraph::RawMatrix Costs(Allowed1->size() + 1, in apply() local
485 addVirtRegCoalesce(Costs, *Allowed1, *Allowed2, CBenefit); in apply()
486 G.addEdge(N1Id, N2Id, std::move(Costs)); in apply()
492 PBQPRAGraph::RawMatrix Costs(G.getEdgeCosts(EId)); in apply() local
493 addVirtRegCoalesce(Costs, *Allowed1, *Allowed2, CBenefit); in apply()
494 G.updateEdgeCosts(EId, std::move(Costs)); in apply()
897 const Vector &Costs = getNodeCosts(NId); in dump() local
898 assert(Costs.getLength() != 0 && "Empty vector in graph."); in dump()
899 OS << PrintNodeInfo(NId, *this) << ": " << Costs << '\n'; in dump()
/external/swiftshader/third_party/llvm-10.0/llvm/lib/CodeGen/
DRegAllocPBQP.cpp485 PBQPRAGraph::RawMatrix Costs(Allowed1->size() + 1, in apply() local
487 addVirtRegCoalesce(Costs, *Allowed1, *Allowed2, CBenefit); in apply()
488 G.addEdge(N1Id, N2Id, std::move(Costs)); in apply()
494 PBQPRAGraph::RawMatrix Costs(G.getEdgeCosts(EId)); in apply() local
495 addVirtRegCoalesce(Costs, *Allowed1, *Allowed2, CBenefit); in apply()
496 G.updateEdgeCosts(EId, std::move(Costs)); in apply()
890 const Vector &Costs = getNodeCosts(NId); in dump() local
891 assert(Costs.getLength() != 0 && "Empty vector in graph."); in dump()
892 OS << PrintNodeInfo(NId, *this) << ": " << Costs << '\n'; in dump()
/external/llvm/lib/CodeGen/
DRegAllocPBQP.cpp460 PBQPRAGraph::RawMatrix Costs(Allowed1->size() + 1, in apply() local
462 addVirtRegCoalesce(Costs, *Allowed1, *Allowed2, CBenefit); in apply()
463 G.addEdge(N1Id, N2Id, std::move(Costs)); in apply()
469 PBQPRAGraph::RawMatrix Costs(G.getEdgeCosts(EId)); in apply() local
470 addVirtRegCoalesce(Costs, *Allowed1, *Allowed2, CBenefit); in apply()
471 G.updateEdgeCosts(EId, std::move(Costs)); in apply()
842 const Vector &Costs = getNodeCosts(NId); in dump() local
843 assert(Costs.getLength() != 0 && "Empty vector in graph."); in dump()
844 OS << PrintNodeInfo(NId, *this) << ": " << Costs << '\n'; in dump()
/external/tensorflow/tensorflow/python/grappler/
Dcluster_wrapper.cc56 tensorflow::grappler::Costs* costs) { in _GetOpPerformanceDataAndRunTime()
264 tensorflow::grappler::Costs costs; in PYBIND11_MODULE()
290 using DurationType = tensorflow::grappler::Costs::Duration::rep; in PYBIND11_MODULE()

123