[PATCH] D139710: [AMDGPU] MachineScheduler: schedule execution metric added for the UnclusteredHighRPStage

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 9 13:22:46 PST 2022


rampitec added a comment.

Do you have any performance measurements?
Also guard it with an option to turn it off.



================
Comment at: llvm/lib/Target/AMDGPU/GCNSchedStrategy.cpp:854
+  if (DAG.RegionsWithMinOcc[RegionIdx]) {
+    DAG.MinOccupancyRegionsMetrics[RegionIdx] = getScheduleMetrics();
+  }
----------------
You probably do not need to compute it always, just in UnclusteredHighRPStage?


================
Comment at: llvm/lib/Target/AMDGPU/GCNSchedStrategy.cpp:1023
     return true;
+  } else {
+    auto ISBefore = DAG.MinOccupancyRegionsMetrics.find(RegionIdx);
----------------
No else after return.


================
Comment at: llvm/lib/Target/AMDGPU/GCNSchedStrategy.cpp:1032
+      std::min(S.getTargetOccupancy(), PressureBefore.getOccupancy(ST));
+      float Profit = (static_cast<float>(WavesAfter) / WavesBefore *
+                      OldMetric / NewMetric);
----------------
Avoid using float. Use scaled integers.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D139710/new/

https://reviews.llvm.org/D139710



More information about the llvm-commits mailing list