我正在尝试粗略了解 Python 脚本生成的失败次数。我使用 perf
如下:
perf stat -a -e fp_arith_inst_retired.128b_packed_double,fp_arith_inst_retired.128b_packed_single,fp_arith_inst_retired.256b_packed_double,fp_arith_inst_retired.256b_packed_single,fp_arith_inst_retired.scalar_double,fp_arith_inst_retired.scalar_single,fp_assist.any -B ./abc
在我的 abc
脚本中,我有以下内容:
#!/bin/bash
/home/usr/anaconda3/bin/python flops.py
我的问题是如何将命令的输出放入文件中?我尝试附加到 > output.txt
上面的命令,但是它只是插入到我的 output.txt
中的 python 脚本的输出。我希望将 perf stat ...
的结果放入一个文件中。