Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Host JIT segfaults compiling @oneapi in a loop over a tuple of functions

Đã đóng
#669 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Một pull request liên quan đã được merge.

  • #685 của @maleadt — đã merge

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
48/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
julia
Lĩnh vực
backend

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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 max in 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 @oneapi expands to.
  • Iris Xe (i7-1165G7), Linux.
Ngôn ngữ chính
Julia
Star
217
Fork
37
Merge trung bình
1 ngày 5 giờ
Pull request đã merge (30 ngày)
40

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của JuliaGPU/oneAPI.jl

Tất cả issue của JuliaGPU/oneAPI.jl

Issue tương tự

Thêm issue về Julia

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.