[PATCH] D18340: AMDGPU: allow specifying a workgroup size that needs to fit in a compute unit
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 23 09:19:28 PDT 2016
arsenm added inline comments.
================
Comment at: lib/Target/AMDGPU/SIRegisterInfo.cpp:39
@@ +38,3 @@
+ if (ST.getGeneration() >= AMDGPUSubtarget::VOLCANIC_ISLANDS) {
+ AllowedSGPRCount = 800;
+ AllowedSGPRCount = (AllowedSGPRCount / MaxWaveCountPerSIMD) & ~15;
----------------
This should not be a magic number. Also MaxWorkgroupSGPRCount would be a better name
================
Comment at: lib/Target/AMDGPU/SIRegisterInfo.cpp:40
@@ +39,3 @@
+ AllowedSGPRCount = 800;
+ AllowedSGPRCount = (AllowedSGPRCount / MaxWaveCountPerSIMD) & ~15;
+
----------------
There is a alignTo function you should use
http://reviews.llvm.org/D18340
More information about the llvm-commits
mailing list