Top all-time · #21205
Yuxin's Homepage
Personal blog · ppwwyyxx.com/blogaiprogramming
Yuxin's Homepage is a personal blog at ppwwyyxx.com about ai and programming. Since 2021, 3 different Hacker News readers have linked it 3 times. It is still writing: the last post was on 2026-06-08, and you can follow it by feed.
Too few sampled comments (2) to say how often HN recommends it.?
Why HN links it
Linked for posts on Python memory and multiprocessing, including how shared objects hit refcounts and how to share NumPy arrays between processes. The comments cite it as background without judging it.
Summarised by Claude from a sample of 2 HN comments that link here. Each comment is marked recommending, critical or neutral (citing without judging); how this works.
Yuxin's Homepage
Most-linked posts?
- /blog/2022/Demystify-RAM-Usage-in-Multiprocess-DataLoader/2 people · 2 mentions · first linked 2023-08-29
What Hacker News says?
The problem is, once you access such shared objects in Python, it is never readonly access but actually read-write, because it modifies the refcount. The problem is also described here: https://ppwwyyxx.com/blog/2022/Demystify-RAM-Usage-in-Multip... But also, you say you would prefer such a unbound memory access hack instead of using a global variable? But also, why does it need to be a global variable? When you for…
Comment linking /blog/2022/Demystify-RAM-Usage-in-Multiprocess-DataLoader/
on “A library to assist writing memory-unsafe code in "pure" Python”Submitted Where Are Pixels? – A Deep Learning Perspective as a story · 76 points
HN discussionThis is a super common occurrence in training loops for ML models because PyTorch uses multiprocessing for its dataloader workers. If you want to read more, see the discussion in this issue: https://github.com/pytorch/pytorch/issues/13246#issuecomment... As you’ve pointed out fork() isn’t ideal for a number of reasons and in general it’s preferred to use torch tensors directly instead of numpy arrays so that you are…
Comment linking /blog/2022/Demystify-RAM-Usage-in-Multiprocess-DataLoader/
on “How to share a NumPy array between processes”