This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: Propagate amdgpu-waves-per-eu
AbandonedPublic

Authored by arsenm on Sep 20 2021, 1:56 PM.

Details

Summary

This one is a bit weird due to the interaction with the implied range
from amdgpu-flat-workgroup-size. At the default group range of 1,1024,
the minimum implied bounds is 4 so this ends up introducing the
attribute on undecorated functions.

Diff Detail

Event Timeline

arsenm created this revision.Sep 20 2021, 1:56 PM
arsenm requested review of this revision.Sep 20 2021, 1:56 PM
Herald added a reviewer: baziotis. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript
Herald added a subscriber: wdng. · View Herald Transcript
jdoerfert added inline comments.Sep 20 2021, 3:05 PM
llvm/lib/Target/AMDGPU/AMDGPUAttributor.cpp
651

Is it on purpose that you use the assumed/initial value of the flat-work-group-size as known range here?

arsenm added inline comments.Sep 20 2021, 3:12 PM
llvm/lib/Target/AMDGPU/AMDGPUAttributor.cpp
651

Yes, but I wasn't completely sure if this was the correct way to handle this. The amdgpu-flat-workgroup-size implies restrictions on amdgpu-waves-per-eu, but amdgpu-flat-workgroup-size should win if there's a conflict. There should always be an initially known range

jdoerfert added inline comments.Sep 20 2021, 4:36 PM
llvm/lib/Target/AMDGPU/AMDGPUAttributor.cpp
651

So, the way it is now you will never go below the initial flat-workgroup-size.

From what I read it seems like you want an upper bound?
If so, you need to restrict the assumed value.
That way you'll go at most as big as the flat-workgroup-size initially is.

You might also need to consider doing this in update if you need to be bound by the final flat-workgroup-size and not only the initial one.

arsenm abandoned this revision.Jun 22 2023, 3:11 AM

Apparently I reposted this as D115559

Herald added a project: Restricted Project. · View Herald TranscriptJun 22 2023, 3:11 AM