[llvm] [AMDGPU][MISCHED] GCNBalancedSchedStrategy. (PR #66634)

via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 19 10:07:16 PDT 2023


alex-t wrote:

> I have two remaining points to discuss.
> 
> 
> We bypass the UnclusteredHighRPStage (in its `initGCNRegion`) for regions with the following condition:
> 
> ```
>   if ((!DAG.RegionsWithMinOcc[RegionIdx] ||
>        DAG.MinOccupancy <= InitialOccupancy) &&
>       !DAG.RegionsWithExcessRP[RegionIdx])
>     return false;
> ```
> 
> My question: for the balanced scheduler, should we actually run this phase for `RegionsWithMinOcc && !RegionsWithExcessRP`?
> 
The idea to run this stage for the ExcessRP regions only is correct. This is (I hope temporarily) left aside to avoid vast changes throughout the scheduler. The reason is that the spill-controlling mechanisms heavily rely on the MinOCC set and as soon as we touch this we immediately have to rewrite a lot of things.

> 
> Should we run `ClusteredLowOccStage` for _any_ region so long as we have observed an occupancy drop (at least for the experimental version)?

The fact we observed an occupancy drop does not make our schedule invalid, right? So, maybe the chance to improve ILP at the cost of worsening the occupancy yet more is not as bad?  We need to have more real traces collected from the real program runs to have statistics.



https://github.com/llvm/llvm-project/pull/66634


More information about the llvm-commits mailing list