MCPcopy Create free account
hub / github.com/Oneflow-Inc/oneflow / UpdateTaskId

Method UpdateTaskId

oneflow/core/graph/task_node.cpp:387–394  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

385}
386
387void TaskNode::UpdateTaskId() {
388 CHECK_NE(machine_id_, -1);
389 CHECK_NE(thrd_id_, -1);
390 StreamId stream_id = DecodeStreamIdFromInt64(thrd_id_);
391 new_task_id_.reset(
392 new TaskId(Singleton<IDMgr>::Get()->GetTaskIdGenerator()->Generate(stream_id)));
393 task_id_ = EncodeTaskIdToInt64(*new_task_id_);
394}
395
396void TaskNode::update_new_task_id(const TaskId& task_id) {
397 CHECK(static_cast<bool>(new_task_id_));

Callers

nothing calls this directly

Calls 6

DecodeStreamIdFromInt64Function · 0.85
GetFunction · 0.85
EncodeTaskIdToInt64Function · 0.85
GetTaskIdGeneratorMethod · 0.80
resetMethod · 0.45
GenerateMethod · 0.45

Tested by

no test coverage detected