← 返回事件
持续讨论AI发版6.1

trunk/42f04f29182a6cd7a72a493e9cca1136756cc312: [torch] Make singletons immortal (#194371) (#194371)

图:PyTorch Releases

发生了什么

Summary: Every value in the torch namespace is a process-lifetime singleton, and on a free-threaded build every one of them is an ordinary mortal PyObject . Loading a mortal object owned by another thread takes the shared incref path, an atomic read-modify-write on one cache line, so a dtype=torch.long keyword or a torch.cat lookup in a hot loop becomes a point of contention for the whole process. Measured across mu…

摘要按规则整理自下方来源原文

为什么在扩散

来源