Details
Diff Detail
Event Timeline
lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp | ||
---|---|---|
211–220 | Should this also have a calculation that takes into account if a trap handler is present? | |
232 | Shouldn't this take into account the presence of a trap handler? return std::min(MaxNumSGPRs - (TRAP_ENABLED ? TRAP_NUM_SGPRS : 0), AddressableNumSGPRs); | |
251–260 | Since getMaxNumVGPRs() was updated to use a calculation should this one too? |
Address review comments.
lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp | ||
---|---|---|
211–220 | I do not think so. getMinNumSGPRs is used to bump up granulated sgpr count in pgm rsrc1 register to match maximum number of requested waves per execution unit. | |
232 | It should. But it depends on trap handler subtarget feature from D26010, which has not landed yet. |
lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp | ||
---|---|---|
211–220 | Right, but the value required to achieve that is based on determining how many registers the kernel must use. That value is reduced if there is a trap handler as the hardware will automatically allocate registers for the trap handler. It would also seem better if the hardcoded numbers here were replaced by the calculation that produces them which can then use the already existing target specific constants. If future hardware changes those limits then the calculation will still be correct. |
lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp | ||
---|---|---|
211–220 | Sorry, missed that the function was updated with the calculation. So ignore that part: of the comment-) |
Should this also have a calculation that takes into account if a trap handler is present?