Host JIT segfaults compiling @oneapi in a loop over a tuple of functions
维护者通常 1 天内回复
已经有一个关联 PR 被合并了。
- #685 来自 @maleadt —— 已合并
评估
调研方向
Start with the reproducer in the issue: compare the host function’s loop over (max, min) using @oneapi launch=false with the single-launch and top-level-loop cases that work. Then inspect the @oneapi expansion and host compilation path; the report identifies LLVM’s LazyCallGraph as the crash site. Done means the reproducer no longer segfaults, including with launch=false.
由索引模型根据 Issue 内容生成。
描述
Compiling a host function that launches a kernel inside a loop over a tuple of functions segfaults Julia's JIT, in LLVM's LazyCallGraph while optimizing the host module. It happens with launch=false too, so it's the host code around @oneapi, not the kernel.
using oneAPI
k(dst, op) = (@inbounds dst[1] = op(dst[1], Int16(1)); return)
function f()
for op in (max, min)
d = oneArray(zeros(Int16, 1))
kern = @oneapi launch=false k(d, op)
println(kern)
end
end
f()
[3624266] signal 11 (1): Segmentation fault
in expression starting at seg7.jl:10
_ZN4llvm13LazyCallGraph4Node12populateSlowEv at .../libLLVM.so.18.1jl (unknown line)
_ZN4llvm13LazyCallGraph12buildRefSCCsEv at .../libLLVM.so.18.1jl (unknown line)
_ZN4llvm33ModuleToPostOrderCGSCCPassAdaptor3runERNS_6ModuleERNS_15AnalysisManagerIS1_JEEE at .../libLLVM.so.18.1jl (unknown line)
run at julia/src/pipeline.cpp:741
operator() at julia/src/jitlayers.cpp:1459
addModule at julia/src/jitlayers.cpp:2043
jl_compile_codeinst_now at julia/src/jitlayers.cpp:626
jl_compile_method_internal at julia/src/gf.c:3528
ijl_apply_generic at julia/src/gf.c:4214
- oneAPI 2.9.2 (registered), Julia 1.12.7; also with Julia 1.13.0 (LLVM 20).
- A single launch with
maxin the same kind of function works, as does the loop at top level. - The same code with CUDA.jl (
@cuda launch=false) works, so this looks specific to what@oneapiexpands to. - Iris Xe (i7-1165G7), Linux.
- 主要语言
- Julia
- 星标
- 218
- 派生
- 36
- 平均合并
- 1 天 7 小时
- 30 天内合并 PR
- 57
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
JuliaGPU/oneAPI.jl 的其他 Issue
-
performance
难度 4/5 3-5 天 新手友好度 48/100
维护者通常 1 天内回复
-
libraries upstream
难度 4/5 1-2 天 新手友好度 22/100
JuliaGPU/oneAPI.jl#703 · 2 条评论 ·
维护者通常 1 天内回复
-
ci
难度 5/5 一周以上 新手友好度 35/100
JuliaGPU/oneAPI.jl#663 · 1 个 reaction ·
维护者通常 1 天内回复
-
runtime upstream
难度 4/5 3-5 天 新手友好度 48/100
维护者通常 1 天内回复
-
ci kernels upstream
难度 4/5 3-5 天 新手友好度 35/100
JuliaGPU/oneAPI.jl#538 · 2 条评论 ·
维护者通常 1 天内回复
查看 JuliaGPU/oneAPI.jl 的全部 Issue
相似的 Issue
-
io
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 72/100
-
难度 2/5 1-3 小时 新手友好度 72/100
JuliaGPU/GPUArrays.jl#837 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 88/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
bmad-sim/BeamTracking.jl#382 ·
维护者通常 1 天内回复