Topic
6 replies Latest Post - ‏2011-08-15T21:03:04Z by msaadie
SystemAdmin
SystemAdmin
10114 Posts
ACCEPTED ANSWER

Pinned topic how to get timings on the PPU?

‏2007-05-24T23:47:19Z |
Hi,

I would like to compare performance on the PPU and SPEs.
Is there the equivalent of spu_read_decrementer() on the PPU?

Alternatively, how to get times on the PPU?

Thanks
Updated on 2011-08-15T21:03:04Z at 2011-08-15T21:03:04Z by msaadie
  • SystemAdmin
    SystemAdmin
    10114 Posts
    ACCEPTED ANSWER

    Re: how to get timings on the PPU?

    ‏2007-05-25T06:37:41Z  in response to SystemAdmin
    Hello,

    There is a nice timing function given by gobucks in this forum here:
    http://www-128.ibm.com/developerworks/forums/dw_thread.jsp?forum=739&thread=151807&message=13919604&cat=46&q=time_int#13919604

    Hope this helps.
  • SystemAdmin
    SystemAdmin
    10114 Posts
    ACCEPTED ANSWER

    Re: how to get timings on the PPU?

    ‏2007-06-21T20:57:15Z  in response to SystemAdmin
    The PPU analog of spu_read_decrementer() is __mftb(). Be aware the counter goes in the opposite direction on the PPU.
    • SystemAdmin
      SystemAdmin
      10114 Posts
      ACCEPTED ANSWER

      Re: how to get timings on the PPU?

      ‏2007-06-27T21:53:44Z  in response to SystemAdmin
      Thanks! that helped.
    • msaadie
      msaadie
      13 Posts
      ACCEPTED ANSWER

      Re: how to get timings on the PPU?

      ‏2011-08-14T22:12:24Z  in response to SystemAdmin
      I am having different timings while using spu_read_decrementer() and __mftb(), in my case __mftb() is returning with low time. Could it be because my app is 32-bit? What can I do in that case? Thanks
      • SystemAdmin
        SystemAdmin
        10114 Posts
        ACCEPTED ANSWER

        Re: how to get timings on the PPU?

        ‏2011-08-15T12:21:34Z  in response to msaadie
        Your app being 32-bit should have no bearing on the timing. Both the SPE decrementers and the PPU time base register should operate off a common clock domain, so timings should be equivalent. How big a difference are you seeing?
        • msaadie
          msaadie
          13 Posts
          ACCEPTED ANSWER

          Re: how to get timings on the PPU?

          ‏2011-08-15T21:03:04Z  in response to SystemAdmin
          Its weird Time measured through __mftb by PPU for the entire function call (which includes SPUs using DMA to get data and compute results) is around 0.000098s and Time taken by single spu to complete single computation is coming out to be 0.000567s. Even same results with gettimeoftheday. Will debug my code further I am sure something is wrong :) and thanks.