Analyzers
Talk to fellow users of Intel Analyzer tools (Intel VTune™ Profiler, Intel Advisor)
5116 Discussions

How can I get correct CPI of my function?

zhouyi1999
Beginner
442 Views
Hi:

IhadusedVTuneto understand performance of my OpenMP programs. The number of cores used is sixteen.
After "Run Activity",Idouble-clickmyprocess,anddouble-clickone of threads,and then double-clickmy function module.Sohotspots shows.
When I focus on one of my functions, I get "Clocks per Instructions Retired - CPI" 1.20
For another thread, I get "Clocks per Instructions Retired - CPI" 1.15

1)How can I get correct CPI of my function? Should I do average of CPI among sixteen cores?

2)When I click my function name in hotspots lists, I can see the code ofthe function and values of "CPU_CLK_UNHALTED.CORE" "INST_RETIRED.ANY".IcomputeCPI used the values,whichis differrent with "Clocks per Instructions Retired - CPI" above.
I confuse about it.

Thank you!
0 Kudos
1 Solution
Peter_W_Intel
Employee
442 Views
Yes. The CPI value is averagevalue -total cycles(in function) divided bytotalretired instructions (infunction), which was calculated by VTune Analyzer.

Please understand that allused data should be event count! Not samples.

Click (select) on one function, and review datain Right Summary Info.

Regards, Peter

View solution in original post

0 Kudos
1 Reply
Peter_W_Intel
Employee
443 Views
Yes. The CPI value is averagevalue -total cycles(in function) divided bytotalretired instructions (infunction), which was calculated by VTune Analyzer.

Please understand that allused data should be event count! Not samples.

Click (select) on one function, and review datain Right Summary Info.

Regards, Peter

0 Kudos
Reply