[all-commits] [llvm/llvm-project] 6daa98: [AMDGPU] MachineScheduler: schedule execution metr...

alex-t via All-commits all-commits at lists.llvm.org
Thu Jan 5 12:11:20 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6daa983c9dde7608bcaa20b11e4a7d28fab4e003
      https://github.com/llvm/llvm-project/commit/6daa983c9dde7608bcaa20b11e4a7d28fab4e003
  Author: Alexander Timofeev <alexander.timofeev at amd.com>
  Date:   2023-01-05 (Thu, 05 Jan 2023)

  Changed paths:
    M llvm/lib/Target/AMDGPU/GCNSchedStrategy.cpp
    M llvm/lib/Target/AMDGPU/GCNSchedStrategy.h
    M llvm/test/CodeGen/AMDGPU/load-global-i16.ll
    M llvm/test/CodeGen/AMDGPU/promote-constOffset-to-imm.ll

  Log Message:
  -----------
  [AMDGPU] MachineScheduler: schedule execution metric added for the UnclusteredHighRPStage

Since the divergence-driven ISel was fully enabled we have more VGPRs available.
         MachineScheduler trying to take advantage of that bumps up the occupancy sacrificing
         the hiding of memory access latency.  This really spoils the initially good schedule.
         A new metric that reflects the latency hiding quality of the schedule has been created
         to make it to balance between occupancy and latency. The metric is based on the latency
         model which computes the bubble to working cycles ratio. Then we use this ratio to decide
         if the higher occupancy schedule is profitable as follows:

             Profit = NewOccupancy/OldOccupancy * OldMetric/NewMetric

Reviewed By: rampitec

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




More information about the All-commits mailing list