[all-commits] [llvm/llvm-project] 02e60f: [AMDGPU] Use max waves for scheduler's initial occ...

Austin Kerbow via All-commits all-commits at lists.llvm.org
Tue Oct 26 15:31:35 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 02e60f2e772575107832623eb7980a748570d3c7
      https://github.com/llvm/llvm-project/commit/02e60f2e772575107832623eb7980a748570d3c7
  Author: Austin Kerbow <Austin.Kerbow at amd.com>
  Date:   2021-10-26 (Tue, 26 Oct 2021)

  Changed paths:
    M llvm/lib/Target/AMDGPU/GCNSchedStrategy.cpp
    M llvm/test/CodeGen/AMDGPU/load-global-i16.ll
    M llvm/test/CodeGen/AMDGPU/schedule-regpressure-limit3.ll
    A llvm/test/CodeGen/AMDGPU/schedule-regpressure-misched-max-waves.ll
    M llvm/test/CodeGen/AMDGPU/spill-empty-live-interval.mir

  Log Message:
  -----------
  [AMDGPU] Use max waves for scheduler's initial occupancy target

The scheduler should set critical/excess register usage thresholds that
are guided by the maximum possible occupancy for the function. This
change is focused on setting proper lower bounds on register usage which
we would typically only see when a specific number of maximum waves is
requested with the "waves-per-eu" attribute, or by setting
"amdgpu-num-vgpr|sgpr" directly. This was broken previously. I have a
follow-on patch that will address issues with the scheduler not
targeting correct upper bounds on register usage which is typical with
launch bounds and min "waves-per-eu".

Changes by this patch:

Set the initial critical register usage thresholds to minimum values
that are determined by the maximum possible occupancy for the function,
or the number of allocatable registers, whichever is lower.

Avoid unisgned overflow if register limits are lower than the register
tracking "ErrorMargin", I.e. when using stress-regalloc=2.

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D112373




More information about the All-commits mailing list