mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 13:28:06 +02:00
nvc0: compute a percentage for metric-achieved_occupancy
metric-issue_slot_utilization and metric-branch_efficiency are already computed as percentages. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
This commit is contained in:
parent
10ec27760a
commit
5658ddc7fe
1 changed files with 4 additions and 4 deletions
|
|
@ -437,9 +437,9 @@ sm20_hw_metric_calc_result(struct nvc0_hw_query *hq, uint64_t res64[8])
|
||||||
{
|
{
|
||||||
switch (hq->base.type - NVC0_HW_METRIC_QUERY(0)) {
|
switch (hq->base.type - NVC0_HW_METRIC_QUERY(0)) {
|
||||||
case NVC0_HW_METRIC_QUERY_ACHIEVED_OCCUPANCY:
|
case NVC0_HW_METRIC_QUERY_ACHIEVED_OCCUPANCY:
|
||||||
/* (active_warps / active_cycles) / max. number of warps on a MP */
|
/* ((active_warps / active_cycles) / max. number of warps on a MP) * 100 */
|
||||||
if (res64[1])
|
if (res64[1])
|
||||||
return (res64[0] / (double)res64[1]) / 48;
|
return ((res64[0] / (double)res64[1]) / 48) * 100;
|
||||||
break;
|
break;
|
||||||
case NVC0_HW_METRIC_QUERY_BRANCH_EFFICIENCY:
|
case NVC0_HW_METRIC_QUERY_BRANCH_EFFICIENCY:
|
||||||
/* (branch / (branch + divergent_branch)) * 100 */
|
/* (branch / (branch + divergent_branch)) * 100 */
|
||||||
|
|
@ -530,9 +530,9 @@ sm30_hw_metric_calc_result(struct nvc0_hw_query *hq, uint64_t res64[8])
|
||||||
{
|
{
|
||||||
switch (hq->base.type - NVC0_HW_METRIC_QUERY(0)) {
|
switch (hq->base.type - NVC0_HW_METRIC_QUERY(0)) {
|
||||||
case NVC0_HW_METRIC_QUERY_ACHIEVED_OCCUPANCY:
|
case NVC0_HW_METRIC_QUERY_ACHIEVED_OCCUPANCY:
|
||||||
/* (active_warps / active_cycles) / max. number of warps on a MP */
|
/* ((active_warps / active_cycles) / max. number of warps on a MP) * 100 */
|
||||||
if (res64[1])
|
if (res64[1])
|
||||||
return (res64[0] / (double)res64[1]) / 64;
|
return ((res64[0] / (double)res64[1]) / 64) * 100;
|
||||||
break;
|
break;
|
||||||
case NVC0_HW_METRIC_QUERY_BRANCH_EFFICIENCY:
|
case NVC0_HW_METRIC_QUERY_BRANCH_EFFICIENCY:
|
||||||
return sm20_hw_metric_calc_result(hq, res64);
|
return sm20_hw_metric_calc_result(hq, res64);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue