cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

afo
Adept I

Reading from GPU card much slower thar writing?

Getting back data from stream is about 80x slower than sending...

Dear people,

I am using SDK1.4 with Brook+ to do integer matrix operations. In my application I see that using stream.write is 80x slower than using stream.read for the same amount of data. Is that normal? Is there something that I can do to have the same performance in both operations? Thanks in advance for any insight to this.

best regards,

Alfonso

0 Likes
2 Replies
gaurav_garg
Adept I

I am not sure if you have measured the performance correctly. streamRead is an asynchronous operation whereas streamWrite is blocking and it also include wait for any other operations on stream (read or kernel call).

You should time it like this-

stream.finish();

//timer_start();

// operation on stream - stream.read() or strream.write()

stream.finish();

// timer_stop();

0 Likes

Thanks for the info. I corrected the code that measures time.

best regards,

Alfonso

0 Likes