3 Replies Latest reply on Apr 20, 2009 2:50 PM by ryta1203

    A few CAL questions

    ryta1203

      1. What is the best way to time a kernel in CAL? Is there an API call of some kind?

      2. Is there any way to "turn off" the PV and PS registers (aka, not use them)?

        • A few CAL questions
          MicahVillmow

          The correct way to time a CAL kernel is to follow this pattern:

          flush

          start timer

          execute kernel

          wait on event

          stop timer

           

          As for PV/PS, you cannot turn them off and you really would not want to turn them off as they provide a performance bonus over normal register usage. 

            • A few CAL questions
              ryta1203

              Micah,

                Er, sorry, let me ask another way, sorry if my questions before were confusing:

              1. Is there a timer built into the CAL API? (like there is in CUDA)

              2. I don't care about performance. Ok thank you, they cannot be "turned off". It sure would be great to have different optimization levels for the compiler.

                • A few CAL questions
                  ryta1203

                  Micah,

                   Also, if I am running the same kernel 100 times, how big of an impact will the cache have on the timing if it's not flushed? I'm assuming the cache will most likely setup the first kernel, so there will be an effect there but after that the cache should be setup so the rest of the kernel runs shouldn't have to deal with this extra time.