0

I'm trying to obtain a rough idea of the number of flops a python script is generating. I'm using perf as follows:

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

Inside my abc script I have the following:

#!/bin/bash

/home/usr/anaconda3/bin/python flops.py

My question is how do I get the output of the command into a file ? I tried appending to the command above > output.txt however it's only the output of the python script that gets inserted into my output.txt. I'd like the result of perf stat ... to be put into a file.

Bula
  • 2,398
  • 5
  • 28
  • 54

0 Answers0