9 Replies Latest reply on Oct 12, 2012 10:30 PM by edisonying1984

    OpenCl on APU

    guix

      Hi everyone,

       

      Yes, this is a recurring subject but I did not get a reply on the forum...

       

      My config :

      - APU : A8-3870K (with the latest driver )

      - Ubuntu : 11.04

      - AMD APP SDK: 2.6


      My questions :

      1 - When i run clinfo, i get  (inter alia):

           Name                         : AMD A8-3870 APU with Radeon HD Graphic

           Max compute units     :  4

           Max clock frequency     : 3000MHz (and sometime 800Mhz)

      Well, he found my APU as a device. But  he saw only 4 cores, which corresponds to the CPU part of the APU. Is it a normal behavior ? What about the GPU part ?

      Another thing, sometime i have max clock frequency at 3Ghz and sometime at 800MHz. So, i guess that he switch (randomly ?) on the GPU part...

       

      2 - I'm trying to launch a kernel only on the GPU part of the APU. So, i just give the APU's deviceId when i create my context. It works, but i don't know if i really use the GPU part... Is it enough or there is a special trick for do that ? Maybe with "clCreatSubDevices" ?

       

      3 - Is that my questions have meaning ? Is it possible to work only on the GPU part of the APU ?

       

      Thanks in advance for your help,

      Guix


        • Re: OpenCl on APU
          nou

          currently AMD APP SDK see APU as two distinct devices. and what you see is just CPU part. you must install catalyst drivers to see GPU too.

          • Re: OpenCl on APU
            tzachi.cohen

            1.) There is nothing random about clinfo. On APU machines clinfo will enumerate two devices CPU and GPU, I suspect 3000MHz relate to the CPU and the 800 Mhz relate to the GPU. Be sure to correlate these numbers with the 'Device Type' entry . 

            2+3.) You can relate the device ID to its type by calling clGetDeviceInfo with 'CL_DEVICE_TYPE' parameter or you can create the context using clCreateContextFromType with the parameters: CL_DEVICE_TYPE_GPU/CL_DEVICE_TYPE_CPU/CL_DEVICE_TYPE_ALL.

            • Re: OpenCl on APU
              dmeiser

              Did you make sure that the GPU is enabled in the BIOS?

              • Re: OpenCl on APU
                martinn

                Regarding the MHz variations, this sounds like frequency scaling of the CPU. Try to find some CPU monitoring tool on your system that can show the current CPU frequency and compare with what is reported from clinfo. An alternative approach is to run "cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies" and see if the list contains both 800MHz and 3GHz.

                1 of 1 people found this helpful
                  • Re: OpenCl on APU
                    guix

                    You are rigth Nilsson, my "sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies" contains both 0.8GHz and 3GHz and some others. So, the "max clock frequecy" variations are normals for the CPU part of APU.

                     

                    Thanks,

                    Guix

                  • Re: OpenCl on APU
                    guix

                    Ok guys, thanks for your help.

                    I found what was the problem : My discrete GPU !! (Yes, I should have put this in my config... )

                    In fact : when my discrete GPU (Radeon HD 6870) is plugged, clinfo finds it and only the CPU part of the APU. But without the discrete GPU, indeed, clinfo finds both CPU and GPU parts of APU (the expected behavior) !

                     

                    Now, my question is : Is this mean that GPU part of APU is always disabled if there is an discrete GPU in the system ?

                    I'm sure there is a way to correct that. I found it on the forum : http://devgurus.amd.com/message/1252077#1252077

                    I will study it and tell you if everything works. But, if anyone has advice, I listen

                     

                    Thanks,

                    Guix

                     


                     


                    1 of 1 people found this helpful
                    • Re: OpenCl on APU
                      edisonying1984

                      Hi,

                       

                        I'm also stuck with the frequency issue on the APU, but what I would like to do is to manually set the voltage/frequency for CPU and GPU on a APU. The v/f level for the CPU part can be easily set using a tool like cpufreq, but how can I do it for the GPU part? Does AMD release any tool for this usage?

                       

                      Thanks,

                      Ying