Forums - Getting metrics to work in OpenCL scrubber

14 posts / 0 new
Last post
Getting metrics to work in OpenCL scrubber
mortaeus
Join Date: 25 Apr 14
Posts: 4
Posted: Tue, 2014-05-13 02:25

Hi, I have the Adreno profiler working adequately, scrubbing away in OpenCL happily. However, I can't seem to get the OpenCL metrics (all the juicy cache hits etc.). I have tried to disable the SLEEP/ SLUMBER state by giving /sys/class/kgsl/kgsl-3d0/idle_timer the content 1000000, but still to no avail, the columns that are added in the trace view are unpopulated. I did notice that the frequency is set at 4 hz, which seems very infrequent.

What am I doing incorrect, how can I get it to work

  • Up0
  • Down0
Dave Astle
Profile picture
Join Date: 19 Oct 12
Location: San Diego, CA
Posts: 99
Posted: Tue, 2014-05-13 07:14

What device are you trying this with?

  • Up0
  • Down0
mortaeus
Join Date: 25 Apr 14
Posts: 4
Posted: Thu, 2014-05-15 02:35

MotoX which has Adreno 320.

  • Up0
  • Down0
Dave Astle
Profile picture
Join Date: 19 Oct 12
Location: San Diego, CA
Posts: 99
Posted: Thu, 2014-05-15 09:23

We'll try to get our hands on a MotoX to verify that it works but it should.

After you add scrubber metrics, are you recapturing?

Btw, the 4Hz frequency isn't relevant to scrubber metrics. It applies to grapher metrics (which aren't supported for CL).

  • Up0
  • Down0
mortaeus
Join Date: 25 Apr 14
Posts: 4
Posted: Tue, 2014-05-20 03:42

Thanks for the reply, I look forward to hearing more from you.

I am recapturing, but still to no avail.

Cheers

  • Up0
  • Down0
mortaeus
Join Date: 25 Apr 14
Posts: 4
Posted: Tue, 2014-06-03 02:56

Hi, any news on this yet?

  • Up0
  • Down0
Dave Astle
Profile picture
Join Date: 19 Oct 12
Location: San Diego, CA
Posts: 99
Posted: Thu, 2014-06-05 12:24

We haven't been able to get a hold of a MotoX to test it.

Can you try the latest version of Profiler (3.8, released today)? We've made a bunch of changes/fixes to OpenCL that may have addressed this. Note that the scrubber metrics have moved; they're now attached to the traceview window.

  • Up0
  • Down0
Wade
Join Date: 3 Nov 14
Posts: 2
Posted: Thu, 2014-11-27 05:03
Hi,I have the same problem in Adreno Profiler ver. 3.8
device : Qualcomm DragonBoard 800 APQ8074
it used Adreno™ 330 GPU which support OpenCL 1.1 
 
When I just run the OpenCL sample app (ex: FFT1D,ImageSobelFilter,ParallelPrefixSum) which provided by AdrenoSDK ,and run Scrubber OpenCL the columns of GPU Metrics that are added in the trace view are unpopulated.
But the OpenCL app run the kernel code on GPU and used GPU computing resourse certainly.
And I have change /sys/class/kgsl/kgsl-3d0/idle_timer to 1000000 surely.
 
It is worth noting that i run the sample app combined OpenCL and OpenGLES (ex: ClothSimCLGLES , ParticleSystemCLGLES),the columns of GPU Metrics not empty and exist information.
 
How can I get it to work to capture GPU Metrics (ex: %GPU busy, #Global load/store , %ALU Utilization ,...) when running OpenCL app?
I really need this metrics for research,thinks.
  • Up0
  • Down0
Wade
Join Date: 3 Nov 14
Posts: 2
Posted: Tue, 2014-12-16 05:11

Hi, any method to solve this problem now?
Or have the other way to obtain the GPU metrics on OpenCL app? (maybe don't use adreno profiler?) 


I really need this metrics for research,and look forward to receiving your early reply.
thanks.

  • Up0
  • Down0
mhfeldma Moderator
Join Date: 29 Nov 12
Posts: 310
Posted: Fri, 2015-01-09 07:27

Try the following

1) Use a recent version of the Adreno Profiler 

https://developer.qualcomm.com/mobile-development/maximize-hardware/mobile-gaming-graphics-adreno/tools-and-resources

2) Use setprop ADRENO_PROFILER_ENABLE_OPENCL 1
adb shell
setprop ADRENO_PROFILER_ENABLE_OPENCL 1


3) Use the echo command after running the profiler, before doing the capture:
echo 1000000 > /sys/class/kgsl/kgsl-3d0/idle_timer

 

  •  

 

  • Up0
  • Down0
U_tansuo
Join Date: 8 Dec 13
Posts: 1
Posted: Tue, 2015-02-10 07:59

hi,I have a problem!

OpenCL scrubber not  work for my xiao mi one   adreno 3.8.5256

the capture button is disable,so I can not

  • execute the capture.
  • I use these commands ,for example  adb shell setprop ADRENO_PROFILER_ENABLE_OPENCL 1
    adb shell setprop ADRENO_PROFILER_ENABLE_BLOCKING 1
  • Up0
  • Down0
Ayo Moderator
Profile picture
Join Date: 23 Jan 15
Posts: 31
Posted: Wed, 2015-02-11 15:10

Hello. Please try the following steps, and reply to let us know if it works, or if it fails (please add the step number where it fails in your reply):

1. Terminate all running apps on your device, including the OpenCL app
2. Use “kill-server”
• ayoo@AYOO /cygdrive/c/Dev/product/dev-tech/RobotCL/Build/Android
• $ adb kill-server

3. Enable ADB root access:
• ayoo@AYOO /cygdrive/c/Dev/product/dev-tech/RobotCL/Build/Android
• $ adb root
• restarting adbd as root

4. Remount:
• ayoo@AYOO /cygdrive/c/Dev/product/dev-tech/RobotCL/Build/Android
• $ adb remount
• adb server is out of date. killing...
• * daemon started successfully *
• remount succeeded

5. Start the OpenCL app you want to profile
6. Go to ADB Shell, and enable the property
• ayoo@AYOO /cygdrive/c/Dev/product/dev-tech/RobotCL/Build/Android
• $ adb shell
• root@msm8974:/ # setprop ADRENO_PROFILER_ENABLE_OPENCL 1
• setprop ADRENO_PROFILER_ENABLE_OPENCL 1
• root@msm8974:/ #

7. Start the Adreno Profiler
8. Connect to the device with the running OpenCL app from step #5
9. Open a Scrubber CL document
10. Verify that the “capture” button is RED
11. In the adb shell from step #6, set the “idle_timer”:
• ayoo@AYOO /cygdrive/c/Dev/product/dev-tech/RobotCL/Build/Android
• $ adb shell
• root@msm8974:/ # echo 1000000 > /sys/class/kgsl/kgsl-3d0/idle_timer
• echo 1000000 > /sys/class/kgsl/kgsl-3d0/idle_timer
• root@msm8974:/ #

12. In the Adreno Profiler ScrubberCL view, add some metrics, for example “Metrics > Requested Metrics > Total Kernel”, “Metrics > Requested Metrics > GPU Busy”, and “Metrics > Requested Metrics > Image Loads”. Ignore any warnings that pop up and verify the metrics appear in “Trace View”
13. Click the capture button
14. Verify that some Kernel information is captured

  • Up0
  • Down0
gary_gitelson
Join Date: 20 Mar 15
Posts: 3
Posted: Tue, 2015-07-28 10:35

I followed the steps in the latest post on this thread, and it fails at step #10.  Basically, the Capture button is always greyed out.  I am working on an Intrinsyc DragonBoard 810.  The application that I have is a modified version of the hello_cl demo app in the SDK where I just placed my kernel in place of the normal kernel.  I can see log messages indicating that the kernel runs, and I can connect to the device and the application.  I can get Global Metrics, but nothing else.  I have made sure that I have added the PROFILER permissions to the app (which already had the INTERNET permissions).  I have changed all of the GPU settings referenced here.  Any other ideas?

  • Up0
  • Down0
Carlos Dominguez Moderator
Join Date: 27 Jul 15
Location: San Diego
Posts: 110
Posted: Wed, 2015-07-29 12:34

Hi Gary,

Are you using your modified hello_cl app as a command line application or within an APK. The reason I ask is that if you are using it as a command line application chances are that your app finishes execution before profiler can even connect or sometimes start capturing. In order to help this there's another prop you can set before starting the execution of your command line app that will stop the apps execution until profiler connects and when you signal a 'start capture' it will resume execution. This can be enabled either through the 'OpenCL Settings' tab (enable blocking checkbox) or through another property called ADRENO_PROFILER_ENABLE_BLOCKING. If this works correctly when you run your app you should see a message that says that the app is waiting for profiler to connect and start a capture. An important note is that this(blocking) only works with command line applications and not apks.

So you will need to do the following:

1- Open Adreno Profiler and enable the blocking mode (either setting the prop manually throughh adb shell setprop or through 'OpenCL Settings' tab)

2- Run command line app and make sure it says that it's waiting for profiler to connect.

3- Connect to Adreno Profiler to the running app

4- Start capture that will resume execution and either stop it or let execution of app complete and Adreno Profiler will automatically stop at that point.

Hope this helps!

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.