2017-08-14 98 views
1

我正在尝试关注XLA和JIT的教程(https://www.tensorflow.org/performance/xla/jit)。据https://www.tensorflow.org/performance/xla/jit#step_3_run_with_xla,当我运行命令tensorflow XLA没有生成点文件

https://www.tensorflow.org/performance/xla/jit#step_3_run_with_xla 

应该产生与该位置到XLA图形的输出。但是,我的输出不包含此信息。

Extracting /tmp/tensorflow/mnist/input_data/train-images-idx3-ubyte.gz 
Extracting /tmp/tensorflow/mnist/input_data/train-labels-idx1-ubyte.gz 
Extracting /tmp/tensorflow/mnist/input_data/t10k-images-idx3-ubyte.gz 
Extracting /tmp/tensorflow/mnist/input_data/t10k-labels-idx1-ubyte.gz 
0.9172 

仅生成时间线文件。

编译:张量流R1.3与XLA JIT的CPU

回答

0

这里的关键是命令的这部分:

TF_XLA_FLAGS=--xla_generate_hlo_graph=.* 

整个事情应该是:

TF_XLA_FLAGS=--xla_generate_hlo_graph=.* python mnist_softmax_xla.py 

有了这个,你应该看到一堆线如:

I tensorflow/compiler/xla/service/hlo_graph_dumper.cc:1254] computation cluster_1[_XlaCompiledKernel=true,_XlaNumConstantArgs=0,_XlaNumResourceArgs=0].v31 [GPU-ir-emit-prepare: after flatten-call-graph, pipeline end]: /tmp/hlo_graph_67.5dOpgX.dot 

注意:我在1.4上测试了这个,而不是1.3。