[PATCH] D139467: AMDGPU: Add AMDGPUSubtarget::getEUsPerCU()

Nicolai Hähnle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 23 12:43:34 PST 2023


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG84610a82a1aa: AMDGPU: Add AMDGPUSubtarget::getEUsPerCU() (authored by nhaehnle).
Herald added a subscriber: StephenFan.

Changed prior to commit:
  https://reviews.llvm.org/D139467?vs=480631&id=491483#toc

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D139467

Files:
  llvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp
  llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h


Index: llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h
===================================================================
--- llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h
+++ llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h
@@ -61,6 +61,7 @@
   bool HasFminFmaxLegacy = true;
   bool EnablePromoteAlloca = false;
   bool HasTrigReducedRange = false;
+  unsigned EUsPerCU = 4;
   unsigned MaxWavesPerEU = 10;
   unsigned LocalMemorySize = 0;
   char WavefrontSizeLog2 = 0;
@@ -209,6 +210,11 @@
     return LocalMemorySize;
   }
 
+  /// Number of SIMDs/EUs (execution units) per "CU" ("compute unit"), where the
+  /// "CU" is the unit onto which workgroups are mapped. This takes WGP mode vs.
+  /// CU mode into account.
+  unsigned getEUsPerCU() const { return EUsPerCU; }
+
   Align getAlignmentForImplicitArgPtr() const {
     return isAmdHsaOS() ? Align(8) : Align(4);
   }
Index: llvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp
===================================================================
--- llvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp
+++ llvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp
@@ -173,6 +173,7 @@
     FrameLowering(TargetFrameLowering::StackGrowsUp, getStackAlignment(), 0) {
   // clang-format on
   MaxWavesPerEU = AMDGPU::IsaInfo::getMaxWavesPerEU(this);
+  EUsPerCU = AMDGPU::IsaInfo::getEUsPerCU(this);
   CallLoweringInfo.reset(new AMDGPUCallLowering(*getTargetLowering()));
   InlineAsmLoweringInfo.reset(new InlineAsmLowering(getTargetLowering()));
   Legalizer.reset(new AMDGPULegalizerInfo(*this, TM));


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D139467.491483.patch
Type: text/x-patch
Size: 1510 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230123/017d16c2/attachment.bin>


More information about the llvm-commits mailing list