omniperf icon indicating copy to clipboard operation
omniperf copied to clipboard

Unable to compare 2 kernels from same workload

Open gsitaram opened this issue 2 years ago • 1 comments

It would be nice to easily compare 2 kernels from the same workload where counters were collected for all kernels. I would like to use a command such as:

omniperf analyze -p workloads/vcopy_all/mi200 -k 0 -p workloads/vcopy_all/mi200 -k 1

This results in an error though:

Traceback (most recent call last):
  File "/path/to/omniperf/dev/bin/omniperf", line 682, in <module>
    main()
  File "/path/to/omniperf/dev/bin/omniperf", line 662, in main
    analyze(args)
  File "/path/to/omniperf/dev/bin/omniperf_analyze/omniperf_analyze.py", line 253, in analyze
    run_cli(args, runs)
  File "/path/to/omniperf/dev/bin/omniperf_analyze/omniperf_analyze.py", line 195, in run_cli
    parser.load_table_data(
  File "/path/to/omniperf/dev/bin/omniperf_analyze/utils/parser.py", line 706, in load_table_data
    eval_metric(
  File "/path/to/omniperf/dev/bin/omniperf_analyze/utils/parser.py", line 570, in eval_metric
    out = eval(compile(row[expr], "<string>", "eval"))
  File "<string>", line 1
    ������@
        ^
SyntaxError: (unicode error) 'utf-8' codec can't decode byte 0x9a in position 0: invalid start byte

A workaround is to make a copy of this workload and use each copy in the analyze command as shown below.

cp -r workloads/vcopy_all workloads/vcopy_all_2
omniperf analyze -p workloads/vcopy_all/mi200 -k 0 -p workloads/vcopy_all_2/mi200 -k 1

A fix would be nice to have. It is not urgent though.

gsitaram avatar Jan 16 '23 17:01 gsitaram