[PATCH] D148906: [AMDGPU] Remove function if FeatureWavefrontSize 32 is not supported on current GPU

Brian Sumner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 5 10:38:43 PDT 2023


b-sumner added a comment.

In D148906#4321445 <https://reviews.llvm.org/D148906#4321445>, @foad wrote:

>> I think we need to similarly remove a wavefrontsize64 function if compiling in wave32 mode.
>
> I think this is a reasonable request but it's an extension to what this pass currently does.
>
> - Currently the pass removes functions that rely on features not supported by the `-mcpu=` GPU.
> - The extension would be to remove functions that rely on features not supported by the `-mcpu=` GPU **as modified by any `-mattr=` options**.
>
> Does that make sense? If so can we please implement that in a generic way instead of having a special hack for wave32/wave4 features?

It makes sense to me.  The library doesn't need it currently, but there has been a use case to detect CUmode in the headers, and that could arrive in the library where it would be useful to rely on either the CUmode or WGPmode version of a funciton to be removed depending on the mode.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D148906



More information about the llvm-commits mailing list