Page MenuHomePhabricator

AMDGPU: Make max workgroup size settable by subtarget features
AbandonedPublic

Authored by arsenm on Feb 2 2016, 5:55 PM.

Details

Reviewers
tstellarAMD
Summary

This generates 32 subtarget features for each possible multiple
of the wave size. The attribute is named +max-work-group-size=N.
The use of an equal sign might be weird because no other target
seems to do this, but it is prettier.

Diff Detail

Event Timeline

arsenm updated this revision to Diff 46731.Feb 2 2016, 5:55 PM
arsenm retitled this revision from to AMDGPU: Make max workgroup size settable by subtarget features.
arsenm updated this object.
arsenm added a reviewer: tstellarAMD.
arsenm added a subscriber: llvm-commits.

Why isn't this a function attribute?

arsenm added a comment.Feb 2 2016, 8:15 PM

Why isn't this a function attribute?

This is a property of the runtime. There should be function attributes for related information, such as required workgroup size. There may also be an attribute for maximum to assume but not required, but the subtarget feature would still be needed to validate that it is not above the maximum supported by the runtime, and would also serve as the default if that attribute is missing.

Why isn't this a function attribute?

This is a property of the runtime. There should be function attributes for related information, such as required workgroup size. There may also be an attribute for maximum to assume but not required, but the subtarget feature would still be needed to validate that it is not above the maximum supported by the runtime, and would also serve as the default if that attribute is missing.

Actually the higher workgroups might technically work with the runtime, they just aren't supported. I think the way it works in AMD OpenCL is the max 256 is rejected by default, but there is an environment variable to increase the limit for internal development.

How about just making it a normal string attribute similar to use-soft-float or something like that? Then you can just look it up on the function in the backend and won't need to configure a large set of subtarget features for it?

-eric

arsenm abandoned this revision.Aug 26 2016, 6:10 PM

This was already done differently