cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

cocular
Journeyman III

Register spilling problem


========== Build: started ==========
OpenCL Compile Error: Compiling for device: Turks

Warning: expand kernel has register spilling. Lower performance is expected.
--------

========== Build: 1 of 1 succeeded ==========



This is AMD APP KernelAnalzer2 gives.  So do I have register spilled?

But the statistics gives:


Device    ScratchRegs    ThreadsPerWorkGroup    WavefrontSize    MaxLDSSize    LDSSize    MaxSGPRs    SGPRs    MaxVGPRs    VGPRs    ReqdWorkGroupX    ReqdWorkGroupY    ReqdWorkGroupZ
Turks    0        0            64        32768        188    N/A        N/A    248        15    0        0        0


Since I don't think my VGPRs is more than MaxVGPRs.  Why kernel has register spilling?

0 Likes
1 Solution

Kernel.cl has 3 different kernels

Initialize, expand & push-back & according to the warning message “expand kernel has register spilling. Lower performance is expected

only expand kernel has register spilling.

I think you have not changed kernel name in “Kernel Name(s)” drop down box, if he change it to expand then it will show correct values.

For me it is showing following values for expand kernel

VGPR – 37

Scratch Regs – 2

View solution in original post

0 Likes
5 Replies
himanshu_gautam
Grandmaster

Please attach the relevant kernel as ZIP file.

0 Likes

well in general, scratch regs can comeup before you reach MaxVGPRs, because the GPU scheduler woul try to run multiple wavefronts on a single Compute Unit, which is essential for performance. But you should certainly not get scratchregs for as low as 12-15 VGPRs (in my case). Forwarding to CodeXL team as of now.

Anyways can you confirm, if the performance of your kernel is indeed low? Compare the performance after using -cl-opt-disable flag while building kernel.

0 Likes

The messages displayed and the statistics are taken from the compiler output "as is". CodeXL and Kernel Analyzer do not interfere with this output.

0 Likes

Kernel.cl has 3 different kernels

Initialize, expand & push-back & according to the warning message “expand kernel has register spilling. Lower performance is expected

only expand kernel has register spilling.

I think you have not changed kernel name in “Kernel Name(s)” drop down box, if he change it to expand then it will show correct values.

For me it is showing following values for expand kernel

VGPR – 37

Scratch Regs – 2

0 Likes