cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

ryta1203
Journeyman III

A few CAL questions

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)?

0 Likes
3 Replies

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. 

0 Likes

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.

0 Likes

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.

0 Likes