Skip to content

intel/fs: Optimizations for "small workgroups"

Caio Oliveira requested to merge cmarcelo/mesa:r/brw-small-workgroup-opt into master

If the whole workgroup fit in the SIMD width, we don't need to spend time with SENDs for shared memory fences or control barriers. However we still need to ensure that they act as barriers for the purpose of scheduling, hence making the removal late in the compilation process.

First commit deals with shared memory barriers and second with control barriers. Each commit has the intermediate shader-db results. Combined shader-db results for compute shaders only in Iris / SKL:

total instructions in shared programs: 236150 -> 236042 (-0.05%)
instructions in affected programs: 19483 -> 19375 (-0.55%)
helped: 11
HURT: 0
helped stats (abs) min: 4 max: 20 x̄: 9.82 x̃: 10
helped stats (rel) min: 0.14% max: 11.76% x̄: 3.68% x̃: 1.34%
95% mean confidence interval for instructions value: -13.13 -6.50
95% mean confidence interval for instructions %-change: -6.88% -0.49%
Instructions are helped.

total sends in shared programs: 18189 -> 18151 (-0.21%)
sends in affected programs: 1190 -> 1152 (-3.19%)
helped: 11
HURT: 0
helped stats (abs) min: 1 max: 5 x̄: 3.45 x̃: 4
helped stats (rel) min: 1.38% max: 31.25% x̄: 9.97% x̃: 2.60%
95% mean confidence interval for sends value: -4.42 -2.49
95% mean confidence interval for sends %-change: -18.59% -1.34%
Sends are helped.

And for Iris / ICL:

total instructions in shared programs: 236714 -> 236590 (-0.05%)
instructions in affected programs: 19509 -> 19385 (-0.64%)
helped: 11
HURT: 0
helped stats (abs) min: 4 max: 20 x̄: 11.27 x̃: 12
helped stats (rel) min: 0.14% max: 13.01% x̄: 4.16% x̃: 1.60%
95% mean confidence interval for instructions value: -14.69 -7.86
95% mean confidence interval for instructions %-change: -7.71% -0.61%
Instructions are helped.

total cycles in shared programs: 19622660 -> 19599376 (-0.12%)
cycles in affected programs: 1415420 -> 1392136 (-1.65%)
helped: 9
HURT: 0
helped stats (abs) min: 12 max: 5630 x̄: 2587.11 x̃: 506
helped stats (rel) min: 0.02% max: 8.17% x̄: 3.04% x̃: 2.43%
95% mean confidence interval for cycles value: -4668.90 -505.32
95% mean confidence interval for cycles %-change: -5.40% -0.68%
Cycles are helped.
Edited by Caio Oliveira

Merge request reports