2 Replies Latest reply on Oct 13, 2013 5:04 PM by nick.materise

    Kernel Occupancy Not Displayed in CodeXL


      I am in the process of optimizing a single OpenCL C kernel for an AMD Radeon HD 7970 GPU (950MHz clock, 3 GB GDDR5 RAM) on a system with two Intel Xeon 6-Core hyper-threaded processors (~96 GB DDR3 RAM, ~3 TB HDD) running Ubuntu 12.04 LTS x86-64. I have used the CodeXL Profiler in the past to generate application trace and performance counter information to identify potential bottlenecks in my code. Recently, I updated from the 8.xxx AMD Catalyst Driver to the 13.xxx version, and installed the latest version of CodeXL from their website: (http://developer.amd.com/tools-and-sdks/heterogeneous-computing/codexl/#one) and noticed that the kernel occupancy percent is not displayed for my kernel. I am interested in generating the profiling graphs that estimate optimal workgroup size, register count, and other performance metrics based on performance counter traces to make informed optimization decisions. If anyone has encountered a similar problem and has a solution or may be able to assist in troubleshooting, I would appreciate any help.

        • Re: Kernel Occupancy Not Displayed in CodeXL

          Hi Nick,


          Are you seeing this with both application trace mode and performance counter mode?  The first thing to do is to make sure the option to generate occupancy information is enabled for your project in the GPU Profiler pages of the Project Settings dialog in CodeXL.  Assuming that it is, can you check to see if you get occupancy information generated when profiling one of the APP SDK sample applications (a simple one like MatrixMultiplication would be a good one to try).


          If that works ok, then there might be something specific that your application is doing that is causing this.  Make sure your application is calling clReleaseContext to destroy any OpenCL contexts created.  The profiler will dump occupancy data to disk when this API is called (this is not the only time it dumps to disk, but apps that don't call clReleaseContext may not have all their data logged properly).


          The other thing to try is to attach a debugger (ie gdb) to your application after it has been launched by CodeXL to see if gdb catches any segfaults or other exceptions..  If the application segfaults, then this might explain why there is no occupancy data -- I have see a few cases in the past where an app might segfault only when run by the profiler, and in some cases the segfault only shows up when you have gdb attached.


          If none of the above leads to any clues, and if you are able to share your application, I can take a look at why the profiler won't generate occupancy for the app.




            • Re: Kernel Occupancy Not Displayed in CodeXL

              Hello Chris,    


              Thank you for your response. I have already tried the Histogram example from the AMDAPP SDK examples folder and it still did not display the occupancy information. I will try the MatrixMultiplication example, but I do not anticipate that will display the occupancy data either. I appreciate your response and will follow up once I have any other information regarding my problem.