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

Function UpdateDevice

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

Source from the content-addressed store, hash-verified

422// node, the field will be cleared in the diff.
423template <typename GraphViewT>
424inline void UpdateDevice(NodeViewDiff<GraphViewT>* diff,
425 absl::string_view device) {
426 if (diff->graph_view->GetNode(diff->node_index)->GetDevice() == device) {
427 diff->device.clear();
428 diff->update_device = false;
429 } else {
430 diff->device = string(device);
431 diff->update_device = true;
432 }
433}
434
435// Adds or updates value in vector `v` at index `i`. This will also resize the
436// vector if index `i` is out of bounds, padding the vector with

Callers 2

UpdateNodeDeviceMethod · 0.85
TESTFunction · 0.85

Calls 5

GetDeviceMethod · 0.45
GetNodeMethod · 0.45
clearMethod · 0.45
emptyMethod · 0.45
set_deviceMethod · 0.45

Tested by 1

TESTFunction · 0.68