3 Replies Latest reply on Dec 18, 2012 8:44 AM by chesik

    performance counter, kernel occupancy inconsistent with Southern Island (Linux)

    cguenther

      dear amd dev team,

       

      i am using ubuntu 10.04 x64, amd APP SDK 2.8 and the AMD Catalyst Driver 12.10.

       

      Now i tried to profile my OpenCL kernel with the CodeXL 1.0 and i get some discrepancies of the measured values. See the attached figures:

       

      You can see that the VGPR and SGPR usage of the kernel occupancy tab is not consistent to the values of the performance counter tab. So which ones i should trust?

       

      Also i got  VALUUtilization, CacheHit and MemUnitStalled values, which are far away from the 100% border. Are they per mille instead of per cent, or why they are greater than 100%?

        • Re: performance counter, kernel occupancy inconsistent with Southern Island (Linux)
          chesik

          Hi cguenther,

           

          Looking at the screen shots, it looks like the data is not being displayed in the correct columns in the Performance Counter view.  For instance, the 128 should be in the LocalMemSize column, the 22 should be in the VGPRs column and the 36 shuold be in the SPGRs column.  I'm not sure what might cause this to happen.

           

          Can you zip up and post the profiler output directory for this session?  I'm curious to see the .csv fie and the .occupancy file, though the .isa file my provide some clues too.  To get to the output directory, you can right click on the session in the Profiler Session Explorer and select "Open Containing Folder".

           

          Thanks,

          Chris

          AMD CodeXL team

            • Re: performance counter, kernel occupancy inconsistent with Southern Island (Linux)
              cguenther

              Thanks for your quick response. Can i send you the .isa as personal message? I don't want to open source the kernel yet. It is still work in progress and is necessary for my bachelor thesis, which is also work in progress.

                • Re: performance counter, kernel occupancy inconsistent with Southern Island (Linux)
                  chesik

                  Actually, the .csv file provides enough information to diagnose the problem, so I don't need to see the ISA.  It appears to be related to the locale settings on your machine.  On your machine a comma is being used as a separator in the .csv file as well as the decimal character in the counter values.  For instance, in the first row, the "Time" counter has a value of "0,71778".  The comma is being interpreted as a separator and not the decimal character.  So the viewer is taking the "0" as the value for Time and the "71778" as the value of LocalMemSize.  It should be using "0,71778" for Time and "128" for LocalMemSize.   Similar issues cause problems for other columns as well.

                   

                  CodeXL has code to try and use the current system setting for the list separator character, but that may not be working correctly on your flavor of Linux.

                   

                  The only workaround I can think of is to profile using the command line tool (sprofile), and then import the results into the  CodeXL GUI.  When using the sprofile command line tool, you can tell it which character to use as the column separator in the .csv file using the --outputseparator option to sprofile.  Since comma is used as a decimal on your system, you would want to specify a different character for the output separator (try "--outputseparator ;" ). There is information in the help file on how to generate a profile using the sprofile command line tool.

                   

                  I'll look into the problem you're seeing and let you know if I come up with a better workaround.  I will also try to get this fixed for the next release of CodeXL.

                   

                  Chris