MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / GetCurrNode

Method GetCurrNode

tensorflow/core/grappler/costs/virtual_scheduler.cc:113–122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

111} // namespace
112
113const NodeDef* LIFOManager::GetCurrNode() {
114 CHECK(!nodes_.empty()) << "GetCurrNode(), but there's no ready node";
115 if (curr_pos_ == nodes_.end()) {
116 curr_pos_ = --(nodes_.rbegin().base()); // Last one in the list.
117 }
118 // Once curr_pos_ is set to a valid entry in the list, we keep using the
119 // cached curr_pos_ until RemoveCurrNode() is called. AddNode() will not
120 // change the GetCurrNode() return value.
121 return *curr_pos_;
122}
123
124void LIFOManager::RemoveCurrNode() {
125 // Make sure we have curr_pos_ ready to be removed.

Callers 5

AddCostNodeFunction · 0.45
PredictCostsMethod · 0.45
MarkCurrNodeExecutedMethod · 0.45
TEST_FFunction · 0.45
RunSchedulerMethod · 0.45

Calls 15

rbeginMethod · 0.80
set_opMethod · 0.80
attrMethod · 0.80
nameMethod · 0.65
IsSendFunction · 0.50
IsRecvFunction · 0.50
emptyMethod · 0.45
endMethod · 0.45
baseMethod · 0.45
frontMethod · 0.45
EmptyMethod · 0.45
emplace_backMethod · 0.45

Tested by 2

TEST_FFunction · 0.36
RunSchedulerMethod · 0.36