[all-commits] [llvm/llvm-project] b33c80: [AMDGPU] Add MaxMemoryClauseSchedStrategy (#114957)

Ruiling, Song via All-commits all-commits at lists.llvm.org
Sun Dec 8 18:07:48 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b33c807b39e2fa07977277d13552f3d773c6b61e
      https://github.com/llvm/llvm-project/commit/b33c807b39e2fa07977277d13552f3d773c6b61e
  Author: Ruiling, Song <ruiling.song at amd.com>
  Date:   2024-12-09 (Mon, 09 Dec 2024)

  Changed paths:
    M llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
    M llvm/lib/Target/AMDGPU/GCNSchedStrategy.cpp
    M llvm/lib/Target/AMDGPU/GCNSchedStrategy.h
    A llvm/test/CodeGen/AMDGPU/group-image-instructions.ll
    M llvm/test/CodeGen/AMDGPU/schedule-ilp-liveness-tracking.mir
    M llvm/test/CodeGen/AMDGPU/schedule-ilp.ll

  Log Message:
  -----------
  [AMDGPU] Add MaxMemoryClauseSchedStrategy (#114957)

Also expose an option to choose custom scheduler strategy:
amdgpu-sched-strategy={max-ilp|max-memory-clause}
This can be set through either function attribute or command line option.

The major behaviors of the max memory clause schedule strategy includes:
1. Try to cluster memory instructions more aggressively.
2. Try to schedule long latency load earlier than short latency
   instruction.

I tested locally against about 470 real shaders and got the perf
changes (only count perf changes over +/-10%):
About 15 shaders improved 10%~40%.
Only 3 shaders drops ~10%.

(This was tested together with another change which increases the
maximum clustered dword from 8 to 32).
I will make another change to make that threshold configurable.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list