6 Replies Latest reply on May 8, 2015 3:52 AM by pinform

    monitoring GPU load, temperature programatically

    jason@utopiacompression.com

      Hi,

       

      I'm using OpenCL in computer vision applications and because of the context of unmanned vehicles, I need to monitor the GPU load and temperature.  There is a way to do this with amdconfig --dc commands but these require X11 (on OpenSUSE linux) to be running and I would like to not introduce X11 running on the system while the computer is running the computer vision code.

       

      Any ideas?

       

      Btw, I am using a R9 m290x x2 for this task and amdconfig complains about no supported adapters found!  OpenCL on the GPU and amd control center work fine though, along with glx.

        • Re: monitoring GPU load, temperature programatically
          nou

          I know that amdconfig complains if there is no xorg.conf file. You have to run amdconfig --intial first. You could try make your own monitoring utility with AMD ADL.

            • Re: monitoring GPU load, temperature programatically
              jason@utopiacompression.com

              I would think there is an xorg file in existence already but unfortunately I won't have a chance to check on the machine for a few days.

               

              I did not know about AMD ADL.  I downloaded it and tested the sample program on a computer with a HD 6870.  I found ADL_Overdrive6_ThermalController_Caps and friends which make the programmatic part possible.  However there is a problem in the sample program if DISPLAY is undefined - as I am testing it without X11 running in the context I need to work in. The  ADL_Main_Control_Create function that is dlopened from libatidlxx.so fails with error code -21.

                • Re: monitoring GPU load, temperature programatically
                  jason

                  as of the 14.12 ADL/amdconfig still says no supported adaptors.

                   

                  No needing of DISPLAY is good but I'd just like it if amdconfig functioned correctly.

                    • Re: monitoring GPU load, temperature programatically
                      pinform

                      I checked with the relevant team, and here's the answer I got:

                      When a user tries to load ADL APIs in console mode[without launching X Server], console mode context must be set by the user before calling ADL_Main_ControlCreate; otherwise this method returns error code as “ -21”  which indicates no X Display set.

                      The user can set the console mode context using the ADL API,  “ADL_ConsoleMode_FileDescriptor_Set”. But this method is not exposed to public ADL API.

                      If the user wants to load “ADL_Main_ControlCreate” successfully  without setting the context mode, then X-related libraries should not be installed.

                       

                      --Prasad

                        • Re: monitoring GPU load, temperature programatically
                          jason

                          Should it be added to the public api?

                           

                          Can you give an example doing this in c?  Preferably compilable with the existing SDK if all  you need to work around it as a public API is declare it as an extern function and link in the ADL.

                           

                          Also, what is the reason for the ADL/amdconfig to claim "no supported adaptors" with these GPUs, even while Xorg is running with fglrx and amdcccle works just fine?  Note I'm talking specifically about the M290Xs?