From: Jay Foad Date: Thu, 26 Mar 2020 14:58:31 +0000 (+0000) Subject: [AMDGPU] Rename overloaded getMaxWavesPerEU to getWavesPerEUForWorkGroup X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0fe096c4e92a887c503139e5fb0dece263a1d539;p=platform%2Fupstream%2Fllvm.git [AMDGPU] Rename overloaded getMaxWavesPerEU to getWavesPerEUForWorkGroup Summary: I think Max in the name was misleading. NFC. Reviewers: arsenm, rampitec Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, kerbowa, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D76860 --- diff --git a/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp b/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp index 248c3cb..d3ecb4f 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp +++ b/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp @@ -422,7 +422,7 @@ std::pair AMDGPUSubtarget::getWavesPerEU( // number of waves per execution unit to values implied by requested // minimum/maximum flat work group sizes. unsigned MinImpliedByFlatWorkGroupSize = - getMaxWavesPerEU(FlatWorkGroupSizes.second); + getWavesPerEUForWorkGroup(FlatWorkGroupSizes.second); bool RequestedFlatWorkGroupSize = false; if (F.hasFnAttribute("amdgpu-flat-work-group-size")) { diff --git a/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h b/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h index f7e7927..b200c22 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h +++ b/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h @@ -222,9 +222,10 @@ public: /// \returns Maximum flat work group size supported by the subtarget. virtual unsigned getMaxFlatWorkGroupSize() const = 0; - /// \returns Maximum number of waves per execution unit supported by the - /// subtarget and limited by given \p FlatWorkGroupSize. - virtual unsigned getMaxWavesPerEU(unsigned FlatWorkGroupSize) const = 0; + /// \returns Number of waves per execution unit required to support the given + /// \p FlatWorkGroupSize. + virtual unsigned + getWavesPerEUForWorkGroup(unsigned FlatWorkGroupSize) const = 0; /// \returns Minimum number of waves per execution unit supported by the /// subtarget. @@ -1203,10 +1204,11 @@ public: return AMDGPU::IsaInfo::getMaxFlatWorkGroupSize(this); } - /// \returns Maximum number of waves per execution unit supported by the - /// subtarget and limited by given \p FlatWorkGroupSize. - unsigned getMaxWavesPerEU(unsigned FlatWorkGroupSize) const override { - return AMDGPU::IsaInfo::getMaxWavesPerEU(this, FlatWorkGroupSize); + /// \returns Number of waves per execution unit required to support the given + /// \p FlatWorkGroupSize. + unsigned + getWavesPerEUForWorkGroup(unsigned FlatWorkGroupSize) const override { + return AMDGPU::IsaInfo::getWavesPerEUForWorkGroup(this, FlatWorkGroupSize); } /// \returns Minimum number of waves per execution unit supported by the @@ -1340,10 +1342,11 @@ public: return AMDGPU::IsaInfo::getMaxFlatWorkGroupSize(this); } - /// \returns Maximum number of waves per execution unit supported by the - /// subtarget and limited by given \p FlatWorkGroupSize. - unsigned getMaxWavesPerEU(unsigned FlatWorkGroupSize) const override { - return AMDGPU::IsaInfo::getMaxWavesPerEU(this, FlatWorkGroupSize); + /// \returns Number of waves per execution unit required to support the given + /// \p FlatWorkGroupSize. + unsigned + getWavesPerEUForWorkGroup(unsigned FlatWorkGroupSize) const override { + return AMDGPU::IsaInfo::getWavesPerEUForWorkGroup(this, FlatWorkGroupSize); } /// \returns Minimum number of waves per execution unit supported by the diff --git a/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp b/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp index d467375..31f8831 100644 --- a/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp +++ b/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp @@ -294,8 +294,8 @@ unsigned getMaxWavesPerEU(const MCSubtargetInfo *STI) { return 20; } -unsigned getMaxWavesPerEU(const MCSubtargetInfo *STI, - unsigned FlatWorkGroupSize) { +unsigned getWavesPerEUForWorkGroup(const MCSubtargetInfo *STI, + unsigned FlatWorkGroupSize) { return divideCeil(getWavesPerWorkGroup(STI, FlatWorkGroupSize), getEUsPerCU(STI)); } diff --git a/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h b/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h index a63aa87..aad7d4b 100644 --- a/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h +++ b/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h @@ -95,10 +95,10 @@ unsigned getMinWavesPerEU(const MCSubtargetInfo *STI); /// STI without any kind of limitation. unsigned getMaxWavesPerEU(const MCSubtargetInfo *STI); -/// \returns Maximum number of waves per execution unit for given subtarget \p -/// STI and limited by given \p FlatWorkGroupSize. -unsigned getMaxWavesPerEU(const MCSubtargetInfo *STI, - unsigned FlatWorkGroupSize); +/// \returns Number of waves per execution unit required to support the given \p +/// FlatWorkGroupSize. +unsigned getWavesPerEUForWorkGroup(const MCSubtargetInfo *STI, + unsigned FlatWorkGroupSize); /// \returns Minimum flat work group size for given subtarget \p STI. unsigned getMinFlatWorkGroupSize(const MCSubtargetInfo *STI); @@ -107,7 +107,7 @@ unsigned getMinFlatWorkGroupSize(const MCSubtargetInfo *STI); unsigned getMaxFlatWorkGroupSize(const MCSubtargetInfo *STI); /// \returns Number of waves per work group for given subtarget \p STI and -/// limited by given \p FlatWorkGroupSize. +/// \p FlatWorkGroupSize. unsigned getWavesPerWorkGroup(const MCSubtargetInfo *STI, unsigned FlatWorkGroupSize);