bifrost icon indicating copy to clipboard operation
bifrost copied to clipboard

`bifrost.memory.memset` segfaults

Open jaycedowell opened this issue 2 years ago • 1 comments

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 avatar Sep 06 '23 00:09 jaycedowell

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

jaycedowell avatar Feb 19 '24 23:02 jaycedowell