diff --git a/scripts/benchmark.sh b/scripts/benchmark.sh index 52740fccd..8880b8e1d 100755 --- a/scripts/benchmark.sh +++ b/scripts/benchmark.sh @@ -103,8 +103,13 @@ extract_performance() { $python ./scripts/check_cycles.py $kernel $hw_cycles $sw_cycles || exit fi echo "Extracting performance from cycle count" - echo "$python ./scripts/performance.py \"$metadata\" \"$args\" $hw_cycles >> $outfile" - $python ./scripts/performance.py "$metadata" "$args" $hw_cycles $dcache_stalls $icache_stalls $sb_full_stalls >> $outfile || exit + if [[ "$ci" == 0 ]]; then + echo "$python ./scripts/performance.py \"$metadata\" \"$args\" $hw_cycles $dcache_stalls $icache_stalls $sb_full_stalls >> $outfile" + $python ./scripts/performance.py "$metadata" "$args" $hw_cycles $dcache_stalls $icache_stalls $sb_full_stalls >> $outfile || exit + else + echo "$python ./scripts/performance.py \"$metadata\" \"$args\" $hw_cycles >> $outfile" + $python ./scripts/performance.py "$metadata" "$args" $hw_cycles >> $outfile || exit + fi } extract_performance_dotp() { diff --git a/scripts/performance.py b/scripts/performance.py index c25b380eb..2c5691b87 100755 --- a/scripts/performance.py +++ b/scripts/performance.py @@ -176,9 +176,10 @@ def main(): metadata = str(sys.argv[1]).split() args = str(sys.argv[2]).split() cycles = int(sys.argv[3]) - dcache_stall= int(sys.argv[4]) - icache_stall= int(sys.argv[5]) - sb_full = int(sys.argv[6]) + if len(sys.argv) > 4: + dcache_stall= int(sys.argv[4]) + icache_stall= int(sys.argv[5]) + sb_full = int(sys.argv[6]) # Extract performance information try: result = perfExtr[metadata[0]](args, cycles) @@ -189,7 +190,10 @@ def main(): # Print performance information on file # kernel, lanes, vsize, sew, perf, max_perf, ideal_disp - print(metadata[0], metadata[1], result[0], metadata[3], result[1], real_max_perf, metadata[4], dcache_stall, icache_stall, sb_full) + if len(sys.argv) > 4: + print(metadata[0], metadata[1], result[0], metadata[3], result[1], real_max_perf, metadata[4], dcache_stall, icache_stall, sb_full) + else: + print(metadata[0], metadata[1], result[0], metadata[3], result[1], real_max_perf, metadata[4]) if __name__ == '__main__': main()