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

perf(algebra): constant-fold affine time-step operators (α·I + β·Laplacian) into one stencil pass

Abierto
#52 0 comentarios 0 reacciones 0 asignados Ver en GitHub

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

performance

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

  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 RallypointOne/MatrixFreeOperators.jl

Todos los issues de RallypointOne/MatrixFreeOperators.jl

Issues similares

Más issues de Julia

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.