attribute((amdgpu_flat_work_group_size(<min>, <max>))) - request minimum and maximum flat work group size
attribute((amdgpu_waves_per_eu(<min>[, <max>]))) - request minimum and/or maximum waves per execution unit
Details
- Reviewers
aaron.ballman • tstellarAMD arsenm - Commits
- rG5b48d725a0bc: [AMDGPU] Expose flat work group size, register and wave control attributes
rC282371: [AMDGPU] Expose flat work group size, register and wave control attributes
rL282371: [AMDGPU] Expose flat work group size, register and wave control attributes
Diff Detail
Event Timeline
include/clang/Basic/Attr.td | ||
---|---|---|
1054–1057 | This FIXME is now detached from what "this" is referring to. Can you clarify by mentioning that the Subjects list is what should be modified? | |
1067 | Looking at the documentation, are you sure this should be a VariadicUnsignedArgument? It seems like this should be an UnsignedArgument with the optional bit set. Or can you pass multiple Max values? | |
include/clang/Basic/AttrDocs.td | ||
1145 | There's an extra space between "can" and "hide". | |
1151 | Comma after "executed". | |
1154 | An error instead of The error. | |
include/clang/Basic/DiagnosticSemaKinds.td | ||
2383 | I think this should say the attribute argument is invalid, rather than the attribute parameter. | |
lib/CodeGen/TargetInfo.cpp | ||
6958 | Should be const auto *Attr. | |
6967–6969 | Elide braces? | |
6972 | const auto * here as well. | |
6983–6985 | Elide braces? | |
6995 | const auto * here as well. | |
lib/Sema/SemaDeclAttr.cpp | ||
4932 | I don't think this case is required (here, or elsewhere). getArgAsExpr() already returns an Expr *. | |
4944–4945 | Please include this text in the diagnostic rather than hard-coding it here. You can use %select to differentiate between different text snippets in the diagnostic, and the diagnostic doesn't need to continue to try to be generic. Same comment applies elsewhere. | |
4973 | This will change if you use the optional bit rather than a variadic argument, but this silently eats attributes that have more than two arguments, which is not a good user experience. | |
6033–6037 | This list is getting to the point where we really need to start handling this in Attr.td soon. Are you planning to work on more AMDGPU attributes in the near future? | |
test/SemaOpenCL/amdgpu-attrs.cl | ||
53 | I'd like to see a test that shows amdgpu_waves_per_eu with > 2 arguments to make sure it's handled appropriately. |
include/clang/Basic/Attr.td | ||
---|---|---|
1067 | You are right. Switched to UnsignedArgument since only one Max is allowed. Thanks. | |
lib/Sema/SemaDeclAttr.cpp | ||
6033–6037 | I agree, and yes, few more attributes will need to be added in the near future. Would it be ok if I change it to start handling in Attr.td after this change, but before other attributes are added? |
lib/Sema/SemaDeclAttr.cpp | ||
---|---|---|
4952 | Is it okay to supply 0, 0 as the min, max arguments? | |
4982 | Is it okay to supply 0, 0 as the min, max arguments? | |
6033–6038 | Yes, totally fine to be a follow-up patch. I was hoping it would look something like (we can bikeshed the name): def SomeAttr { /* Blah */ } def SomeOtherAttr { let RequiredCompanionAttributes = [SomeAttr]; } |
This FIXME is now detached from what "this" is referring to. Can you clarify by mentioning that the Subjects list is what should be modified?