desihub / gpu_specter

Scratch work for porting spectroperfectionism extractions to GPUs
BSD 3-Clause "New" or "Revised" License
2 stars 3 forks source link

gpu - explore DtH transfer in patch vs bundle #18

Closed lastephey closed 4 years ago

lastephey commented 4 years ago

One question that arose during the hackathon was whether it made sense to transfer data from each patch back the the cpu every time or to accumulate patch data and transfer one time after the entire bundle is complete.

Explore how much performance gain could come from accumulating data for a single DtH transfer rather than many smaller transfers.

However, weigh this against the amount of data we must keep in memory as we accumulate results from each patch. Determine if this memory accumulation is feasible.

Compare additional memory requirements to DtH performance wins to recommend memory transfer strategy (i.e. per patch or per bundle).

lastephey commented 4 years ago

Rahul reminded me that pinning memory can be very expensive. It only pays off if you are going to use it many times.

In the case that we accumulate data and transfer one time (i.e. per bundle), we most likely wouldn't want to pin memory.

lastephey commented 4 years ago

We are now transferring at the end of each bundle which seems fine and has a low memory transfer overhead