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

Function Reset

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

Source from the content-addressed store, hash-verified

634// Resets and clears existing diff.
635template <typename GraphViewT>
636inline void Reset(NodeViewDiff<GraphViewT>* diff) {
637 diff->name.clear();
638 diff->update_name = false;
639 diff->op.clear();
640 diff->update_op = false;
641 diff->device.clear();
642 diff->update_device = false;
643 std::vector<SafeTensorId>().swap(diff->regular_inputs_to_add);
644 diff->num_regular_inputs_to_add = false;
645 std::map<int, SafeTensorId>().swap(diff->regular_inputs_to_update);
646 std::vector<bool>().swap(diff->regular_inputs_to_remove);
647 diff->num_regular_inputs_to_remove = 0;
648 absl::flat_hash_set<string>().swap(diff->controlling_inputs_to_add);
649 std::set<int>().swap(diff->controlling_inputs_to_remove);
650 absl::flat_hash_map<string, AttrValue>().swap(diff->attrs_to_add);
651 absl::flat_hash_set<string>().swap(diff->attrs_to_remove);
652}
653
654// Checks if changes to node will result in a valid node.
655template <typename GraphViewT>

Callers 5

GraphViewMethod · 0.70
MutableGraphViewMethod · 0.70
TESTFunction · 0.70
QuantizeTrainingTestMethod · 0.50
TEST_FFunction · 0.50

Calls 2

clearMethod · 0.45
swapMethod · 0.45

Tested by 3

TESTFunction · 0.56
QuantizeTrainingTestMethod · 0.40
TEST_FFunction · 0.40