perf(algebra): constant-fold affine time-step operators (α·I + β·Laplacian) into one stencil pass
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 48/100
- Tipo de issue
- Refactorización
- Claridad
- Bastante claro
- Estado de actividad
- Tranquilo
- Stack tecnológico
- julia
- Área
- performance
Línea de trabajo
Start with the lazy operator-tree path described around apply!, χ∇², AffineStencil, and the ping-pong idiom, then review the invariants for adjoints, boundary-condition contributions, and trait propagation. Compare the 2046² benchmark in comparisons/chmy_diffusion_2d/ and consider the issue complete when affine constant-coefficient operators fold into one stencil pass with documented usage and the stated performance target is measured.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Context
Sibling of #51 (CPU threading). The Diffusion 2D comparison against Chmy.jl (benchmark/comparisons/chmy_diffusion_2d/) confirmed our fused one-pass stencil beats Chmy's two-kernel flux form 2.5–16.9× single-threaded, with final fields agreeing to machine epsilon. Beyond threading, three ideas would compound the lead. Items 2 and 3 have since moved to their own issues (see below); this issue now tracks item 1 only.
1. Constant-fold affine time-step operators into a single stencil pass (ours to exploit)
Explicit Euler today is two sweeps: apply!(du, χ∇², u) (2 array passes) then u .+= Δt·du (3 passes) — 5 passes/step. But u ← (I + Δt·χ·∇²)u is itself a compact 5-point stencil with center 1 − 4Δtχ/h². An algebraic simplification rule α·I + β·Laplacian → AffineStencil (generally: affine combinations of constant-coefficient stencil leaves) applied ping-pong would make a whole Euler step one fused sweep — ~3 passes/step, a further ~1.7× at DRAM-resident sizes, and 2.3× less traffic than Chmy's 7. Needs: the folded leaf with its declared adjoint (BC contributions included — the invariants stand), explicit trait propagation, and a documented ping-pong idiom. This is the lever Chmy cannot pull cheaply — their flux field is user-visible API, our operator tree is lazy and free to rewrite.
2 and 3 have moved
- The inner/outer split with comm/compute overlap now lives in the distributed tracker: see #46 (build a blocking exchange and measure it before reaching for overlap) under #79.
- "Steer explicit stepping away from the flat
mul!path" is #87.
Target
Numbers to beat at 2046², 5 threads: Chmy 2193 µs/step (~1.9 Gcells/s). Threading (#51) + item 1 project ~3 passes at 150–250 GB/s → roughly 400–700 µs/step, i.e. 3–5× ahead of Chmy at the sizes where we currently lose.
🤖 Beep boop — Claude again, leaving borrowed-blueprint breadcrumbs so future Kyle doesn't have to reverse-engineer his own benchmark.
- Lenguaje dominante
- Julia
- Estrellas
- 3
- Forks
- 1
- Merge medio
- 4 d 19 h
- PR fusionados (30 d)
- 5
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 RallypointOne/MatrixFreeOperators.jl
-
Roadmap: open-issue priorityAbierto
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
-
enhancement
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
-
performance
Dificultad 5/5 Más de una semana Aptitud para principiantes 45/100
-
perf(forest): thread the reference BlockForest path — leaf sweeps and exchange descriptor loopsAbiertoperformance
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
-
enhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
Todos los issues de RallypointOne/MatrixFreeOperators.jl
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
-
documentation invalid
Dificultad 1/5 1-3 horas Aptitud para principiantes 88/100
JuliaPhysics/BeamletOptics.jl#190 ·
Los mantenedores suelen responder en 2 días
-
mul! with a Symmetric or Hermitian factor throws for a matrix view whose columns are not contiguousPosiblemente ocupada @dkarrasch la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
JuliaLang/LinearAlgebra.jl#1829 ·
Los mantenedores suelen responder en 1 día
-
`EnsembleSummary` `ci_type = :SEM` ribbon is `sqrt(N)` too wide for scalar statesPosiblemente ocupada @isaacsas la tomó hace 1 día. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
SciML/SciMLBase.jl#1654 ·
Los mantenedores suelen responder en 3 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
MagneticResonanceImaging/MRIReco.jl#320 ·
Los mantenedores suelen responder en 1 día