[Mesa-dev] [PATCH 2/2] intel/fs: Take into account amount of data read in spilling cost heuristic.

Manolova, Plamena plamena.manolova at intel.com
Fri Apr 21 19:05:59 UTC 2017


Hi Curro,
This series looks good to me :)

Reviewed-by: Plamena Manolova <plamena.manolova at intel.com>

On Fri, Apr 21, 2017 at 11:49 AM, Francisco Jerez <currojerez at riseup.net>
wrote:

> Until now the spilling cost calculation was neglecting the amount of
> data read from the register during the spilling cost calculation.
> This caused it to make suboptimal decisions in some cases leading to
> higher memory bandwidth usage than necessary.
>
> Improves Unigine Heaven performance by ~4% on BDW, reversing an
> unintended FPS regression from my previous commit
> 147e71242ce539ff28e282f009c332818c35f5ac with n=12 and statistical
> significance 5%.  In addition SynMark2 OglCSDof performance is
> improved by an additional ~5% on SKL, and a Kerbal Space Program
> apitrace around the Moho planet I can provide on request improves by
> ~20%.
>
> Cc: <mesa-stable at lists.freedesktop.org>
> ---
>  src/intel/compiler/brw_fs_reg_allocate.cpp | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/intel/compiler/brw_fs_reg_allocate.cpp
> b/src/intel/compiler/brw_fs_reg_allocate.cpp
> index 2d4d46e..ec8e116 100644
> --- a/src/intel/compiler/brw_fs_reg_allocate.cpp
> +++ b/src/intel/compiler/brw_fs_reg_allocate.cpp
> @@ -822,7 +822,7 @@ fs_visitor::choose_spill_reg(struct ra_graph *g)
>     foreach_block_and_inst(block, fs_inst, inst, cfg) {
>        for (unsigned int i = 0; i < inst->sources; i++) {
>          if (inst->src[i].file == VGRF)
> -            spill_costs[inst->src[i].nr] += block_scale;
> +            spill_costs[inst->src[i].nr] += regs_read(inst, i) *
> block_scale;
>        }
>
>        if (inst->dst.file == VGRF)
> --
> 2.10.2
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170421/844ddb80/attachment.html>


More information about the mesa-dev mailing list