Add workgroup size attribute to AMDGPU functions in codegen (#4342)
authorThomas Viehmann <tv.code@beamnet.de>
Fri, 15 Nov 2019 23:14:56 +0000 (00:14 +0100)
committermasahi <masahi129@gmail.com>
Fri, 15 Nov 2019 23:14:56 +0000 (08:14 +0900)
commit0a9f7e9ade7302dd120bcf4739415a57f462148d
tree265c9877793bfeb63af7e058f4bb8d0c81e052b9
parentd58b733a037387d98ec66a85a1c5015a0bb2372d
Add workgroup size attribute to AMDGPU functions in codegen (#4342)

When we did not set the workgroup size, LLVM will use too many registers
for kernel launches with many threads. This resulted in "invalid ISA"
errors. Here we set the maximum workgroup size to the maximum threads
per block from the device API.

Of course, one might look into allowing configurations with fewer
threads at runtime to use more registers.
src/codegen/llvm/codegen_amdgpu.cc