3 Replies Latest reply on Jul 8, 2013 7:06 AM by qqchose

    AMD compiler issues?




      We have issues with our kernel. It’s look like compiler issues.


      Our kernel is big then I cannot write it down here.


      I use AMD_Catalyst_13.6_Beta2

      My video card is “AMD Radeon HD 6900 Series”


      Our kernel works on NVIDIA’s card. But, when we try on ATI, it’s not working. I'm trying to investigate. I added a debug buffer to return information to see what happen in kernel (CodeXL just crash each time I try to use it...). I added a line like this.


      myDebugBuffer[index].MyTestVariable = 12456.0f;


      Now, our kernel is working. Nothing uses the debug buffer. It’s just a write only buffer to read back when the kernel is done. I compiled with “AMD APP kernelAnalyser2” both versions (with and without this debug line). I was surprised how many differences there are between both versions. The IL code with the debug line is twice smaller (365 Ko vs 622 Ko). It’s not the first time we got an issues and adding a random line “fix” our kernel.


      Are there know issues with AMD compiler? Are there trap we can check to avoid and fix this kind of bug?



        • Re: AMD compiler issues?



          I think it's a too big kernel. I think 365K of il code generates much more than 48KB of machine code which is the instruction cache size of your GPU. So it will go as slow as CPU anyways.

          You should reorganize your program somehow... Cut it down to more than on kernels, not unrolling some loops, etc.

          Another important thing is the number of  scratch registers. Try to have 0 of those!


          BTW: Some years ago, my record was around 120KB of working machine code (automatically generated stuff). But it was so ineffective , and It looked like it's killing the compiler.

          1 of 1 people found this helpful
          • Re: AMD compiler issues?

            Some big kernels (like those present in Blender cycles) are known to be having issues in compilation.

            In case you are ok to share your kernel privately to AMD Engineers, we can try to find the issue there.

            1 of 1 people found this helpful