The cl-uniform-work-group attribute asserts that the global work-size
be a multiple of the work-group specified work group size. This should
allow optimizations. It is already present by default in the AMD
compiler and for HIP kernels so it should be safe to allow this for
OpenMP kernels by default.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang/lib/CodeGen/TargetInfo.cpp | ||
---|---|---|
9424–9432 | Can we move this whole thing out of amdgpu code and into language code? |
clang/lib/CodeGen/TargetInfo.cpp | ||
---|---|---|
9424–9432 | Do you mean moving this into each language's respective code generation / sema? This seemed like the most straightforward place to put it as it's where we attach other target specific attributes. |
clang/lib/CodeGen/TargetInfo.cpp | ||
---|---|---|
9424–9432 | But it's not actually a target specific attribute, it's a language property |
clang/lib/CodeGen/TargetInfo.cpp | ||
---|---|---|
9424–9432 | Sure, I just figured this was the easier option since it already existed here for HIP. Which file do you suggest this go in? Should we just do this specifically in HIP / OpenMP codegen? |
clang/lib/CodeGen/TargetInfo.cpp | ||
---|---|---|
9424–9432 | Putting it here is a fine first step, it's just always bothered me that it's here. I don't know clang enough to know where it belongs. OpenCL defined this in the first place and changed the default behavior in CL2.0 |
Can we move this whole thing out of amdgpu code and into language code?