[PATCH] D129759: [AMDGPU] Set amdgpu-memory-bound if a basic block has dense global memory access

Abinav Puthan Purayil via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 14 05:14:40 PDT 2022


abinavpp created this revision.
abinavpp added reviewers: arsenm, foad, rampitec.
Herald added subscribers: kosarev, jsilvanus, kerbowa, hiraditya, t-tye, tpr, dstuttard, yaxunl, nhaehnle, jvesely, kzhuravl.
Herald added a project: All.
abinavpp requested review of this revision.
Herald added subscribers: llvm-commits, wdng.
Herald added a project: LLVM.

AMDGPUPerfHintAnalysis doesn't set the memory bound attribute if
FuncInfo::InstCost outweighs MemInstCost even if we have a basic block
with relatively high global memory access. GCNSchedStrategy could revert
optimal scheduling in favour of occupancy which seems to degrade
performance for some kernels. This change introduces the
HasDenseGlobalMemAcc metric in the heuristic that makes the analysis
more conservative in these cases.

This fixes SWDEV-334259/SWDEV-343932


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D129759

Files:
  llvm/lib/Target/AMDGPU/AMDGPUPerfHintAnalysis.cpp
  llvm/lib/Target/AMDGPU/AMDGPUPerfHintAnalysis.h
  llvm/test/CodeGen/AMDGPU/perfhint.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D129759.444607.patch
Type: text/x-patch
Size: 4164 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220714/b76910e5/attachment.bin>


More information about the llvm-commits mailing list