Returns true iff the given node is considered "expensive". The executor uses this flag to optimize graph execution, for example by "inlining" inexpensive kernels.
| 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 { |
no test coverage detected