ledatelescope / bifrost

A stream processing framework for high-throughput applications.
BSD 3-Clause "New" or "Revised" License
64 stars 29 forks source link

`bifrost.memory.memset` segfaults #222

Open jaycedowell opened 10 months ago

jaycedowell commented 10 months ago

I was running into an issue with the digital system for LWA-NA throwing a segfault when bifrost.memory.memset was called using a bifrost.ndarray that lived in cuda space. I was able to get around it by switching to bifrost.ndarray.memset_array but I did look into the underlying problem. It seems that memset is using a possibly outdated way to determine where the data lives and was always (?) treating the array like it lived in system. I guess there are two things here:

  1. Fix memset to use a better way to determine the memory space.
  2. Do we really need memset if we have memset_array?
jaycedowell commented 4 months ago

According to memory.py it looks like we should just drop memcpy/memcpy2D and memset/memset2D.

https://github.com/ledatelescope/bifrost/blob/7dc1c5cd6919501b39757cc6db5d05d9049285b0/python/bifrost/memory.py#L63