Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

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

Cerrado
#669 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Ya se ha fusionado un pull request relacionado.

  • #685 de @maleadt — fusionado

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
48/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
julia
Área
backend

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.
Lenguaje dominante
Julia
Estrellas
217
Forks
37
Merge medio
1 d 5 h
PR fusionados (30 d)
40

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de JuliaGPU/oneAPI.jl

Todos los issues de JuliaGPU/oneAPI.jl

Issues similares

Más issues de Julia

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.