Deduplicate concurrent compilations of the same kernel
Los mantenedores suelen responder en 3 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 30/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Área
- performance
Línea de trabajo
Start in compile_or_lookup in src/launch.jl, where the existing job_results_lock check and the compile-outside-lock path live, and read cached_results(job) to see how one TileCompilerResults maps to each job. Add per-result in-flight tracking with a Threading.Condition created on that lock, and keep the in-flight state out of TileCompilerResults, since that type is serialized into package images. Done means concurrent misses for one job run tileiras once, waiters reuse the published cubin and call GPUCompiler.run_compile_hook, and a failed compile wakes waiters so they retry rather than hang.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
compile_or_lookup (src/launch.jl) already compiles outside job_results_lock, but concurrent misses for the same job all compile: each requester runs emit_tile and its own tileiras, and the first result to be published wins. ObjCache.get! does not deduplicate in-flight work either.
On an RTX 5080, 8 tasks first-launching the same matmul configuration spawned tileiras 8 times for that job. tileiras takes 55–550 ms for the example kernels (fmha: 0.64 s, 133 MB RSS, single-threaded), against 1–27 ms for emit_tile, so every duplicate costs a full assembler run. With more tasks than cores, that also delays the first launch for everyone.
JuliaGPU/CUDA.jl#3398 handles the same situation for CUDA.jl's ptxas, with in-flight tracking modelled on Base.require's package_locks. Here it could go in compile_or_lookup, since cached_results(job) already returns one TileCompilerResults per job:
- keep an
IdDict{TileCompilerResults,Threads.Condition}guarded byjob_results_lock, with every condition created on that lock; - under the lock: if
res.cubinis set, return it; if an entry exists,waiton it and check again; otherwise register a condition and compile outside the lock; - under the lock, publish
res.cubin, then remove the entry andnotify(in afinally, so that after a failure the waiters retry instead of hanging); - waiters that end up with a published CUBIN call
GPUCompiler.run_compile_hook(job), like hits do.
The in-flight state shouldn't live on TileCompilerResults itself, which is serialized into package images.
- Lenguaje dominante
- Julia
- Estrellas
- 90
- Forks
- 13
- Merge medio
- 4 d 8 h
- PR fusionados (30 d)
- 19
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
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de JuliaGPU/cuTile.jl
-
cuTile-specific launch macroAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
JuliaGPU/cuTile.jl#295 · 3 comentarios ·
Los mantenedores suelen responder en 3 días
-
`atomic_store_add` of a slice extracted from a tile adds nothing when the slice is under 256 bytesAbierto
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
Los mantenedores suelen responder en 3 días
-
Tile IR bytecode v13.5 supportAbierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
JuliaGPU/cuTile.jl#333 · 1 comentario ·
Los mantenedores suelen responder en 3 días
-
Dificultad 4/5 3-5 días Aptitud para principiantes 52/100
Los mantenedores suelen responder en 3 días
-
Dificultad 4/5 3-5 días Aptitud para principiantes 52/100
Los mantenedores suelen responder en 3 días
Todos los issues de JuliaGPU/cuTile.jl
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
MagneticResonanceImaging/MRIReco.jl#366 ·
Los mantenedores suelen responder en 3 días
-
`AdamW` gives `NaN` for zero-gradient entries of `Float16` parameters (epsilon underflows to 0)Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 79/100
FluxML/Optimisers.jl#253 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
JuliaGraphs/GraphNeuralNetworks.jl#736 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día
-
`poissonians` is not public, unlike `brownians` and `jumps`Posiblemente ocupada @isaacsas la tomó hoy. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 86/100
SciML/ModelingToolkit.jl#5389 ·
Los mantenedores suelen responder en 2 días