cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

rick_weber
Adept II

Performance timing in Brook+

I want to compute the wall time taken for a compute kernel, neglecting time taken for data transfer to the GPU. Is there an easy way to do this? I could use heuristics to approximate data transfer time and subtract that from the total time including the data transfer, but I don't expect this to be very accurate.

0 Likes
2 Replies
gaurav_garg
Adept I

Brook+ 1.3 provides a new method to check error on Stream. This method synchronizes streams for all the previous commands -

 

Stream<float> a(2, dim);

Stream<float> b(2, dim);

a.read(ptr);

a.error();  // Synchronize for data transfer

timer_start();

kernelCall(a, b); //b is an output stream

b.error(); //Check error on output stream to synchronize kernel

timer_stop();

 

0 Likes

Excellent! I'll give it a whirl.

0 Likes