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

Method pending

tensorflow/core/common_runtime/pending_counts.h:159–179  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

157 }
158 }
159 int pending(Handle h) {
160 if (h.is_large_) {
161 LargeCounts c = Large(h)->load(std::memory_order_relaxed);
162 if (PENDING_NOTREADY == NodeStateForStruct(c)) {
163 return c.pending;
164 } else {
165 // The pending count encodes the state once the node has
166 // started, so just return 0.
167 return 0;
168 }
169 } else {
170 PackedCounts c = Packed(h)->load(std::memory_order_relaxed);
171 if (PENDING_NOTREADY == NodeStateForStruct(c)) {
172 return c.pending;
173 } else {
174 // The pending count encodes the state once the node has
175 // started, so just return 0.
176 return 0;
177 }
178 }
179 }
180 int decrement_pending(Handle h, int v) {
181 DCHECK_GE(pending(h), v);
182 if (h.is_large_) {

Callers 3

TESTFunction · 0.45
DeleteFrameMethod · 0.45
ActivateNodesSlowPathMethod · 0.45

Calls 1

loadMethod · 0.45

Tested by 1

TESTFunction · 0.36