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

Method IsExpensive

tensorflow/core/common_runtime/kernel_stat.h:109–113  ·  view source on GitHub ↗

Returns true iff the given node is considered "expensive". The executor uses this flag to optimize graph execution, for example by "inlining" inexpensive kernels.

Source from the content-addressed store, hash-verified

107 // executor uses this flag to optimize graph execution, for example
108 // by "inlining" inexpensive kernels.
109 bool IsExpensive(const NodeItem& node) const {
110 return is_expensive_[node.node->id()] &&
111 (cost_estimates_[node.node->id()].load(std::memory_order_relaxed) >
112 kOpIsExpensiveThresholdCycles);
113 }
114
115 // Returns the value of kernel->IsExpensive().
116 bool HasExpensiveMarker(const NodeItem& node) const {

Callers 6

InitializeMethod · 0.45
MightTraceFunction · 0.45
ProcessSyncMethod · 0.45
ProcessAsyncMethod · 0.45
ScheduleReadyMethod · 0.45
CostScheduleReadyMethod · 0.45

Calls 2

idMethod · 0.45
loadMethod · 0.45

Tested by

no test coverage detected