为什么分布式tensorflow timeline trace将QueueDequeue操作标记为PS操作?

Why does distributed tensorflow timeline trace mark the QueueDequeue operation as a PS operation?

我是 运行 AWS ubuntu 机器集群上的 tensorflow 分布式初始模型,并通过

输出时间线跟踪
# Track statistics of the run using Timeline
run_options = tf.RunOptions(trace_level=tf.RunOptions.FULL_TRACE)
run_metadata = tf.RunMetadata()

# Run
loss_value, step = sess.run([train_op, global_step], options=run_options, run_metadata=run_metadata)

# Create timeline and write it to a json file
tl = timeline.Timeline(run_metadata.step_stats)
ctf = tl.generate_chrome_trace_format()
with open('timeline%d.json' % FLAGS.task_id, 'w') as f:
f.write(ctf)

当我查看工作机器生成的时间线时,我看到了: Timeline Trace for Worker Machine

请注意右侧的 QueueDequeue 操作,时间线表示它是参数服务器 /job:ps/replica:0/task:0/cpu:0 的一部分。

由于 ScatterUpdate 就在 QueueDequeue 之后,如图所示,我相信此操作对应于同步副本优化器操作,其中工作人员尝试使令牌出队并进行分散更新:https://github.com/tensorflow/tensorflow/blob/master/tensorflow/python/training/sync_replicas_optimizer.py#L412

但如果是这样,应该是工作人员在执行此操作,而不是参数服务器。为什么时间线说参数服务器正在执行这个?

我正在使用 tensorflow 0.11,仅 CPU。

似乎这是正确的,出列操作是在 PS 上执行的。只是worker对这个操作有依赖,也就是说worker本质上是在等待dequeue成功。