epic-astronomy / LWA_EPIC

The LWA-specific implementation of the EPIC correlator
http://livetv.epic-astronomy.org
MIT License
3 stars 3 forks source link

Add synchronize call between MOFF and Save #4

Closed adampbeardsley closed 4 years ago

adampbeardsley commented 4 years ago

I'll just copy-paste Jayce's explanation because I don't fully understand it.

The underlying problem was that all of the CUDA operations are done asynchronously. Normally Bifrost forces a sync when the data cross a memory space boundary. However, when using a CUDA-based ring you end up with data being written that isn't actually there until the memcpy completes. The reserve on the ring doesn't know about this so when that reserve is released the next block starts to read. That read can start before the copy finishes.

jaycedowell commented 4 years ago

Yep.

jaycedowell commented 4 years ago

If anyone wants a bit more info: bifrost#138