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

Function IsEmpty

tensorflow/core/grappler/utils/graph_view_internal.h:622–632  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

620// Checks if any changes are set in the diff.
621template <typename GraphViewT>
622inline 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.
635template <typename GraphViewT>

Callers 15

TESTFunction · 0.85
TEST_PFunction · 0.85
TESTFunction · 0.85
TESTFunction · 0.85
TESTFunction · 0.85
FindBranchOfMethod · 0.85
set_nameMethod · 0.85
set_opMethod · 0.85
set_assigned_deviceMethod · 0.85
set_constant_valueMethod · 0.85
set_inputsMethod · 0.85
set_control_depsMethod · 0.85

Calls 3

EmptyTensorIdFunction · 0.85
emptyMethod · 0.45

Tested by 8

TESTFunction · 0.68
TEST_PFunction · 0.68
TESTFunction · 0.68
TESTFunction · 0.68
TESTFunction · 0.68
TEST_FFunction · 0.68
XLA_TEST_FFunction · 0.68
TESTFunction · 0.68