| 620 | // Checks if any changes are set in the diff. |
| 621 | template <typename GraphViewT> |
| 622 | inline bool IsEmpty(NodeViewDiff<GraphViewT>* diff) { |
| 623 | ResizeByTrimmingEndForValue(&diff->regular_inputs_to_remove, false); |
| 624 | ResizeByTrimmingEndForValue(&diff->regular_inputs_to_add, EmptyTensorId()); |
| 625 | return !diff->update_name && !diff->update_op && !diff->update_device && |
| 626 | diff->regular_inputs_to_add.empty() && |
| 627 | diff->regular_inputs_to_update.empty() && |
| 628 | diff->regular_inputs_to_remove.empty() && |
| 629 | diff->controlling_inputs_to_add.empty() && |
| 630 | diff->controlling_inputs_to_remove.empty() && |
| 631 | diff->attrs_to_add.empty() && diff->attrs_to_remove.empty(); |
| 632 | } |
| 633 | |
| 634 | // Resets and clears existing diff. |
| 635 | template <typename GraphViewT> |