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

Function RecordMutation

tensorflow/c/c_api.cc:241–256  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

239}
240
241void RecordMutation(TF_Graph* graph, const TF_Operation& op,
242 const char* mutation_type) {
243 // If any session has already run this node_id, mark this session as
244 // unrunnable.
245 for (auto it : graph->sessions) {
246 mutex_lock session_lock(it.first->mu);
247 if (it.first->last_num_graph_nodes > op.node.id()) {
248 it.second = strings::StrCat(
249 "Operation '", op.node.DebugString(), "' was changed by ",
250 mutation_type,
251 " after it was run by a session. This mutation will have no effect, "
252 "and will trigger an error in the future. Either don't modify "
253 "nodes after running them or create a new session.");
254 }
255 }
256}
257
258namespace {
259

Callers 6

AddControlInputFunction · 0.85
SetAttrFunction · 0.85
ClearAttrFunction · 0.85
SetRequestedDeviceFunction · 0.85
UpdateEdgeFunction · 0.85
AddWhileInputHackFunction · 0.85

Calls 3

StrCatFunction · 0.50
idMethod · 0.45
DebugStringMethod · 0.45

Tested by

no test coverage detected