Home
last modified time | relevance | path

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

12

/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.h37 virtual Costs PredictCosts(const OpContext& op_context) const;
44 Costs PredictCostOfAnUnknownOp(const OpContext& op_context) const;
48 Costs PredictOpCountBasedCost(double operations, const OpInfo& op_info) const;
53 Costs PredictOpCountBasedCost(double operations, double input_io_bytes,
129 Costs PredictConv2D(const OpContext& op_context) const;
130 Costs PredictCwiseOp(const OpContext& op_context) const;
131 Costs PredictConv2DBackpropInput(const OpContext& op_context) const;
132 Costs PredictConv2DBackpropFilter(const OpContext& op_context) const;
133 Costs PredictFusedConv2DBiasActivation(const OpContext& op_context) const;
134 Costs PredictMatMul(const OpContext& op_context) const;
[all …]
Dop_level_cost_estimator_test.cc453 Costs PredictCosts(const OpContext& op_context) const { in PredictCosts()
529 EXPECT_EQ(Costs::Duration(0), cost.memory_time); in TEST_F()
530 EXPECT_EQ(Costs::Duration(1), cost.compute_time); in TEST_F()
531 EXPECT_EQ(Costs::Duration(1), cost.execution_time); in TEST_F()
549 EXPECT_EQ(Costs::Duration(130), cost.memory_time); in TEST_F()
550 EXPECT_EQ(Costs::Duration(16), cost.compute_time); in TEST_F()
551 EXPECT_EQ(Costs::Duration(146), cost.execution_time); in TEST_F()
567 EXPECT_EQ(Costs::Duration(0), cost.memory_time); in TEST_F()
568 EXPECT_EQ(Costs::Duration(0), cost.compute_time); in TEST_F()
569 EXPECT_EQ(Costs::Duration(0), cost.execution_time); in TEST_F()
[all …]
Dcost_estimator.h70 struct Costs { struct
72 inline Costs();
75 static inline Costs ZeroCosts();
166 inline std::ostream& operator<<(std::ostream& os, const Costs::MilliSeconds d) { argument
170 inline std::ostream& operator<<(std::ostream& os, const Costs::MicroSeconds d) {
174 inline std::ostream& operator<<(std::ostream& os, const Costs::NanoSeconds d) {
179 Costs::Costs() { in Costs() function
191 Costs Costs::ZeroCosts() { in ZeroCosts()
192 Costs costs; in ZeroCosts()
205 Costs CombineCosts(const Costs& left, const Costs& right);
[all …]
Dvirtual_scheduler.h55 Costs::Duration time_ready;
56 Costs::Duration time_scheduled;
57 Costs::Duration time_finished;
60 std::unordered_map<int, Costs::Duration> time_no_references;
78 time_ready = Costs::Duration::max(); in NodeState()
79 time_scheduled = Costs::Duration::max(); in NodeState()
80 time_finished = Costs::Duration::max(); in NodeState()
113 Costs device_costs;
114 std::map<string, Costs> op_to_cost; // Per-op cost.
120 device_costs = Costs::ZeroCosts(); in DeviceState()
[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()
Dop_level_cost_estimator.cc78 static const Costs::Duration kMinComputeTime(1);
221 typedef Costs (OpLevelCostEstimator::*CostImpl)(const OpContext& op_context) in OpLevelCostEstimator()
223 auto wrap = [this](CostImpl impl) -> std::function<Costs(const OpContext&)> { in OpLevelCostEstimator()
373 Costs OpLevelCostEstimator::PredictCosts(const OpContext& op_context) const { in PredictCosts()
377 std::function<Costs(const OpContext&)> estimator = it->second; in PredictCosts()
378 Costs costs = estimator(op_context); in PredictCosts()
448 Costs OpLevelCostEstimator::PredictCwiseOp(const OpContext& op_context) const { in PredictCwiseOp()
480 Costs costs = PredictOpCountBasedCost(op_count * op_cost, op_info); in PredictCwiseOp()
488 Costs OpLevelCostEstimator::PredictCostOfAnUnknownOp( in PredictCostOfAnUnknownOp()
497 Costs OpLevelCostEstimator::PredictOpCountBasedCost( in PredictOpCountBasedCost()
[all …]
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.cc176 std::vector<std::pair<const NodeDef*, Costs::Duration>> candidates; in GetCurrNode()
194 [](const std::pair<const NodeDef*, Costs::Duration>& a, in GetCurrNode()
195 const std::pair<const NodeDef*, Costs::Duration>& b) { in GetCurrNode()
264 graph_costs_(Costs::ZeroCosts()), in VirtualScheduler()
286 graph_costs_ = Costs::ZeroCosts(); in Init()
433 curr_node_state.time_ready = Costs::Duration(); in Init()
681 node_state.time_no_references[i] = Costs::Duration::max(); in GetNodeStateOrCreateIt()
688 node_state.time_no_references[-1] = Costs::Duration::max(); in GetNodeStateOrCreateIt()
695 Costs& VirtualScheduler::FindOrCreateZero(const string& op_name, in FindOrCreateZero()
696 std::map<string, Costs>* op_cost) { in FindOrCreateZero()
[all …]
Dgraph_memory.cc192 Costs::MicroSeconds(node_stats.all_start_micros()); in InferFromTrace()
195 live->deallocation_time = std::max<Costs::Duration>( in InferFromTrace()
197 Costs::NanoSeconds(1) + in InferFromTrace()
198 Costs::MicroSeconds(node_stats.all_start_micros() + in InferFromTrace()
236 live->deallocation_time = std::max<Costs::Duration>( in InferFromTrace()
238 Costs::NanoSeconds(1) + in InferFromTrace()
239 Costs::MicroSeconds(node_stats.all_start_micros() + in InferFromTrace()
Danalytical_cost_estimator.cc40 int node_id, const Costs& node_costs, in AddCostNode()
137 Costs* costs) const { in PredictCosts()
143 costs->execution_time = Costs::Duration::max(); in PredictCosts()
163 Costs node_costs; in PredictCosts()
Dgraph_memory.h35 Costs::Duration allocation_time;
36 Costs::Duration deallocation_time;
Danalytical_cost_estimator_test.cc102 Costs summary; in TEST_F()
105 EXPECT_EQ(Costs::NanoSeconds(9157), summary.execution_time); in TEST_F()
Dmeasuring_cost_estimator.h62 RunMetadata* run_metadata, Costs* cost) const override;
Danalytical_cost_estimator.h61 RunMetadata* run_metadata, Costs* cost) const override;
Dvirtual_scheduler_test.cc1598 Costs SimplePredictCosts(const OpContext& op_context) const { in SimplePredictCosts()
1599 Costs c; in SimplePredictCosts()
1608 c.execution_time = Costs::NanoSeconds(exec_cost); in SimplePredictCosts()
1623 Costs node_costs = SimplePredictCosts(op_context); in RunScheduler()
2285 Costs c = scheduler_->Summary(); in TEST_F()
2305 Costs c = scheduler_->Summary(&metadata); in TEST_F()
2625 Costs c = scheduler_->Summary(); in TEST_F()
2641 Costs c = scheduler_->Summary(); in TEST_F()
2663 Costs c = scheduler_->Summary(&metadata); in TEST_F()
2725 Costs c = scheduler_->Summary(&metadata); in TEST_F()
/external/tensorflow/tensorflow/core/grappler/optimizers/
Dstatic_schedule_test.cc56 std::unordered_map<const NodeDef*, Costs::NanoSeconds> completion_times; in TEST_F()
65 EXPECT_EQ(Costs::NanoSeconds(1), time.second); in TEST_F()
67 EXPECT_EQ(Costs::NanoSeconds(1500001), time.second); in TEST_F()
69 EXPECT_EQ(Costs::NanoSeconds(4000004), time.second); in TEST_F()
71 EXPECT_EQ(Costs::NanoSeconds(6500007), time.second); in TEST_F()
73 EXPECT_EQ(Costs::NanoSeconds(9000010), time.second); in TEST_F()
75 EXPECT_EQ(Costs::NanoSeconds(11500013), time.second); in TEST_F()
77 EXPECT_EQ(Costs::NanoSeconds(14000013), time.second); in TEST_F()
102 std::unordered_map<const NodeDef*, Costs::NanoSeconds> completion_times; in TEST_F()
111 EXPECT_EQ(Costs::NanoSeconds(1), time.second); in TEST_F()
[all …]
Dstatic_schedule.cc30 static Costs::NanoSeconds PredictExecutionTime( in PredictExecutionTime()
52 Costs::NanoSeconds estimate = in PredictExecutionTime()
56 return std::max(estimate, Costs::NanoSeconds(1)); in PredictExecutionTime()
61 std::unordered_map<const NodeDef*, Costs::NanoSeconds>* completion_times) { in EstimateEarliestExecutionTimes()
103 Costs::NanoSeconds execution_time = in EstimateEarliestExecutionTimes()
105 Costs::NanoSeconds completion_time = in EstimateEarliestExecutionTimes()
119 Costs::NanoSeconds ready_time = in EstimateEarliestExecutionTimes()
130 const std::unordered_map<const NodeDef*, Costs::NanoSeconds>& in EstimateRequiredTimes()
132 std::unordered_map<const NodeDef*, Costs::NanoSeconds>* required_times) { in EstimateRequiredTimes()
136 (*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.cc771 Costs::NanoSeconds time_to_swap = 0;
777 const std::unordered_map<const NodeDef*, Costs::NanoSeconds>& in FindSwapInTrigger()
782 Costs::NanoSeconds max_trigger_time(0); in FindSwapInTrigger()
810 std::map<Costs::NanoSeconds, const NodeDef*> candidates; in FindSwapInTrigger()
894 const std::unordered_map<const NodeDef*, Costs::NanoSeconds>& in FindSwapOutTrigger()
908 Costs::NanoSeconds earliest_fanout(Costs::NanoSeconds::infinity()); in FindSwapOutTrigger()
979 std::unordered_map<string, Costs::NanoSeconds> op_completion_times; in IdentifySwappingCandidates()
996 Costs::NanoSeconds exec_time = in IdentifySwappingCandidates()
997 Costs::NanoSeconds(1) + in IdentifySwappingCandidates()
998 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-7.0/llvm/include/llvm/CodeGen/PBQP/
DGraph.h69 NodeEntry(VectorPtr Costs) : Costs(std::move(Costs)) {} in NodeEntry() argument
95 VectorPtr Costs; variable
104 EdgeEntry(NodeId N1Id, NodeId N2Id, MatrixPtr Costs) in EdgeEntry() argument
105 : Costs(std::move(Costs)) { in EdgeEntry()
153 MatrixPtr Costs; variable
376 NodeId addNode(OtherVectorT Costs) { in addNode() argument
378 VectorPtr AllocatedCosts = CostAlloc.getVector(std::move(Costs)); in addNode()
397 NodeId addNodeBypassingCostAllocator(OtherVectorPtrT Costs) { in addNodeBypassingCostAllocator() argument
398 NodeId NId = addConstructedNode(NodeEntry(Costs)); in addNodeBypassingCostAllocator()
410 EdgeId addEdge(NodeId N1Id, NodeId N2Id, OtherVectorT Costs) { in addEdge() argument
[all …]
/external/swiftshader/third_party/llvm-7.0/llvm/lib/CodeGen/
DRegAllocPBQP.cpp486 PBQPRAGraph::RawMatrix Costs(Allowed1->size() + 1, in apply() local
488 addVirtRegCoalesce(Costs, *Allowed1, *Allowed2, CBenefit); in apply()
489 G.addEdge(N1Id, N2Id, std::move(Costs)); in apply()
495 PBQPRAGraph::RawMatrix Costs(G.getEdgeCosts(EId)); in apply() local
496 addVirtRegCoalesce(Costs, *Allowed1, *Allowed2, CBenefit); in apply()
497 G.updateEdgeCosts(EId, std::move(Costs)); in apply()
891 const Vector &Costs = getNodeCosts(NId); in dump() local
892 assert(Costs.getLength() != 0 && "Empty vector in graph."); in dump()
893 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/core/grappler/clusters/
Dvirtual_cluster.cc85 Costs ignored_costs; in Run()

12