张量板和chrome:// tracing上每个操作的性能不匹配

时间:2018-07-23 17:09:16

标签: python tensorflow tensorboard

我正在尝试使用from tensorflow.python.client import timeline来完善张量流图的性能。

我按照说明进行操作:https://www.tensorflow.org/guide/graph_viz。页面底部有一个名为Runtime statistics的部分

我还按照此处的说明进行操作: Can I measure the execution time of individual operations with TensorFlow? ,使用chrome跟踪。

所有代码都可以在这里找到: 我从/models/tutorials/image更改为https://github.com/yncxcw/alexnetbenchmark

这是所有操作的张量板布局: enter image description here 这是chrome:// tracing的输出: enter image description here

这两种跟踪方式的问题在于,同一操作lrn的计算时间不匹配。张量板显示27us,而镶边显示15ms。虽然是正确的,但为什么会发生这种情况。

详细信息: GPU:TITAN Xp主:6次:1个内存时钟频率(GHz):1.582 Tensorflow:

CUDA:9.1

Tensorflow:1.8.0

操作系统:Ubuntu 16.04

0 个答案:

没有答案