SEP 40 default overhead: edge reads cost more than 2 % on short line runs and on native Cartesian

Abierto
#396 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
8/100
Tipo de issue
Error
Claridad
Necesita aclaración
Estado de actividad
Activo
Stack tecnológico
python
Área
performance

Línea de trabajo

The overhead is measured in the native backend's march and its edge reads, the k⊥ ramp and the Cartesian filament case, and the payload names no file or test. Start by profiling a native Cartesian read on Linux, including the march's return and its state copy, and compare against the ifftn and einsum costs listed in the table. Done would mean the per-read host cost is explained, though the maintainer has already recorded this as a miss and moved to Final.

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

Descripción

area: boundaries performance priority: medium

SEP 40 §7.7 sets a 2 % limit on the default's cost (the k⊥ safety ramp plus the reads of the transverse edge) on clean CPU runs. It was measured at the end of the SEP: Xeon Gold 6240, one socket, 18 threads, same process, variants interleaved, medians of six rounds.

backend case steps (no reads → reads) reads ramp edge both
native line 27 → 28 19 −0.1 % +14.4 % +14.0 %
native planar 40 → 40 24 −9.9 % +10.8 % 0.0 %
native radial_filament_256 127 → 127 19 +0.1 % +2.1 % +2.2 %
native cartesian_filament_128 (warned, half length) 40 → 41 20 +0.6 % +10.1 % +10.5 %
numba_cpu line 27 → 28 19 +0.2 % +5.9 % +6.4 %
numba_cpu planar 40 → 40 24 −1.5 % +0.9 % −1.1 %
numba_cpu radial_filament_256 127 → 127 19 0.0 % −0.2 % −0.1 %
numba_cpu cartesian_filament_128 (warned, half length) 40 → 41 20 +0.4 % +3.0 % +2.6 %

The ramp costs nothing. The remaining cost of reading has two parts:

  1. The read ceiling. It adds one step on the line case (27 → 28, +3.7 %) and on the Cartesian filament. Steps are capped at the read spacing, min(L/16, 4g/v_q), and that cap binds on some steps.
  2. Per-read host cost.
    • The line case is a 0.2 s native run, so reads at about 1 ms each are 10 % of it.
    • On native Cartesian, each read costs about 180 ms on the Xeon Gold 6240. The read's own pieces should cost about 70 ms: an 18-thread ifftn of 128² × 433 in 12 ms, einsum sums of 9 ms, and copies.
    • On an Apple M5 Max, the same read costs about 13 ms.
    • Neither OMP_WAIT_POLICY=passive nor one FFT worker changed it, so it is not thread contention. The remainder is probably the native march's return and re-entry around a read, or the host copy of the state; it has not been profiled on Linux.

Leads:

  • profile a native Cartesian read on Linux, including the march's return and its state copy;
  • let a native backend reduce the edge's faces where its state lives, as ADR-057 does for the temporal monitor;
  • consider whether L/16 should bind on cases whose light stays far from the edge.

From SEP 40's phase 3 report (#71). The maintainer's decision (2026-11-01): record a miss and proceed to Final.

Lenguaje dominante
Python
Estrellas
3
Forks
3
Merge medio
8 h 37 min
PR fusionados (30 d)
159

Preparar el entorno

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 LupoLab/solprop

Todos los issues de LupoLab/solprop

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.