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

Make blocking Level Zero calls GC-safe

Cerrado
#698 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.

  • #704 de @maleadt — fusionado

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
55/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
c
Área
hpc

Línea de trabajo

Start by comparing the plain @ccall wrappers in lib/level-zero/libze.jl with the @gcsafe_ccall usage in lib/level-zero/synchronization.jl, then find the generator in res/wrap.jl. Check the blocking callers in lib/level-zero/module.jl, fence.jl and event.jl. Done means the blocking Level Zero calls use GC-safe ccalls, the wrappers still load, and the existing test suite passes.

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

Descripción

The generated Level Zero wrappers in lib/level-zero/libze.jl all use a plain @ccall. While such a call runs, its thread is in a GC-unsafe state, so a garbage collection requested by any other thread waits until the call returns. That only matters for calls that can block for a long time:

  • zeModuleCreate (called from ZeModule, lib/level-zero/module.jl) runs the IGC compile. On an Iris Xe with a cold NEO cache (NEO_CACHE_PERSISTENT=0) it took 19–248 ms per kernel. That is the first launch of every kernel in a session whose driver cache doesn't have it yet.
  • Base.wait(::ZeFence) and Base.wait(::ZeEvent) (lib/level-zero/fence.jl, event.jl) call zeFenceHostSynchronize/zeEventHostSynchronize with a typemax(UInt64) timeout, i.e. block for as long as the GPU work takes.

The synchronization in lib/level-zero/synchronization.jl already uses @gcsafe_ccall for the same reason, and CUDA.jl's wrapper generator emits every driver call as @gcsafe_ccall (res/wrap/wrap.jl there), e.g. cuModuleLoadData and cuLinkComplete. Either approach works here: rewrite all calls in res/wrap.jl, or only the blocking ones above. Level Zero documents these functions as thread-safe.

Lenguaje dominante
Julia
Estrellas
217
Forks
37
Merge medio
1 d 7 h
PR fusionados (30 d)
45

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.