resize! frees its new buffer with free instead of release
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
阅读 src/array.jl:659-661 中 resize! 的终结器,并将其与 src/array.jl:129-131 中数组构造函数的终结器以及 src/pool.jl 中的 release 进行比较。检查相关的终结器或内存管理测试,然后运行这些测试;当调整大小后的缓冲区通过 release(buf) 释放,从而应用其记账和同步行为时,即为完成。
由索引模型根据 Issue 内容生成。
描述
The buffer that resize! allocates is freed by a finalizer that calls free(buf) (src/array.jl:659-661 at 0c02df0), whereas the array constructor's finalizer calls release(buf) (src/array.jl:129-131). That skips everything release does (src/pool.jl):
_allocated_bytesis never decremented for resized device and shared buffers, so the proactive-GC thresholds see memory that was freed long ago as still allocated;- on the LTS stack, the queues that may still reference the buffer aren't synchronized before freeing, which is the workaround for NEO 25.18 unmapping memory with work in flight (a GPU page fault that bans the context);
- the free doesn't use
ZE_DRIVER_MEMORY_FREE_POLICY_EXT_FLAG_BLOCKING_FREE.
So a vector that was resize!d and then becomes garbage while its last kernel is still running can take down the context on LTS. Using release(buf) in that finalizer, like the constructor does, should fix all three.
- 主要语言
- Julia
- 星标
- 217
- 派生
- 37
- 平均合并
- 18 小时 12 分钟
- 30 天内合并 PR
- 26
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
JuliaGPU/oneAPI.jl 的其他 Issue
-
Wrong results for overflowing Int16 arithmetic in a reduction kernel可能已有人在做 @maleadt 今天认领。 未关闭
难度 4/5 3-5 天 新手友好度 45/100
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 48/100
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 35/100
JuliaGPU/oneAPI.jl#663 · 1 个 reaction ·
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 45/100
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 35/100
JuliaGPU/oneAPI.jl#607 · 1 条评论 ·
维护者通常 1 天内回复
查看 JuliaGPU/oneAPI.jl 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
oxfordcontrol/COSMO.jl#211 ·
-
documentation
难度 2/5 半天 新手友好度 65/100
维护者通常 6 天内回复
-
ARKODE: callbacks that modify `u` throw MethodError on reinit可能已有人在做 @devmotion 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 79/100
SciML/Sundials.jl#575 ·
-
难度 1/5 1 小时以内 新手友好度 78/100
维护者通常 1 天内回复
-
Tube(N) builds N TubeBase segments of length L/(N−1): total friction/inertia length is N·L/(N−1)可能已有人在做 @ChrisRackauckas-Claude 今天认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 78/100
SciML/ModelingToolkitStandardLibrary.jl#525 ·
维护者通常 1 天内回复