bkloppenborg / liboi

OpenCL Interferometry Library
https://github.com/bkloppenborg/liboi/wiki
GNU Lesser General Public License v3.0
5 stars 6 forks source link

Flagged data can result in poor performance #31

Closed bkloppenborg closed 11 years ago

bkloppenborg commented 11 years ago

Flagging data in OIFITS files can result in poor performance for certain values of flagged points. Here are some test results on a MIRC 6T data file (8 channels, 15 rows). From the test results below it is clear this is a problem size division and/or memory access pattern issue.

This data set 2011Nov03-epsAur-avg5.oifits consitsts of 0 Vis 720 V2 960 T3 2860 UV Points

We flagged only V2 records.

Flagging N values inside of a MIRC (8-channel) data file results in the following performance:

Flagging N values between rows of a MIRC (8-channel) data file results in the following performance:

Flagging one entire column (15) plus an extra element in each row to total N:

bkloppenborg commented 11 years ago

Flagging across tables also appears to degrade performance. Points to a similar underlying problem.

A possible solution to this problem is to increase the problem size by padding the input data buffers. This will require that input that will not affect/invalidate the computed results be inserted into the buffers.

Try locating the kernel which is causing the greatest slowdown and pad out buffers there.

bkloppenborg commented 11 years ago

Closed in 281cde4. Performance is better after rounding the buffer size up to the next highest integer multiple of the underlying hardware's number of processors per multiprocessor.

Note, at present we've hardcoded this to 16. This won't work so well for ATI.