Skip to content

docs(worklog): the tall panel pays ~3 us of rayon region per reflector (DROPPED) - #16

Closed
shinaoka wants to merge 0 commit into
mainfrom
perf/tall-panel-region-cost
Closed

shinaoka wants to merge 0 commit into
mainfrom
perf/tall-panel-region-cost

Conversation

@shinaoka

Copy link
Copy Markdown
Member

No code change. This measures what is actually measurable inside this fork for
tlinalg-rs#46's tall-panel item, and says which half is architectural.

The panel does not reach the threads, and four threads is not what stops it. The
unblocked 4096 x 16 QR — 16 reflectors, each a (4096 - j) x (16 - j) rank-one
update, which is the level-2 panel shape — four-thread pool on CPUs 0-3, best of 20,
smallest over 10 interleaved reps (ms):

workers 1 2 4 8
qr 4096x16 0.1957 0.1788 0.1731 0.1968

1.13x, three quarters of it already spent at two threads, and worse at eight. So the
premise that the panel "stops scaling at four threads" is optimistic: on four cores it
barely starts.

The per-call region cost, three ways. 300 repetitions of one 64 x 64 x 64 product,
four-thread pool, best of 3 calls, smallest over 5 interleaved reps, µs per repetition:

sequential threaded, back to back threaded after a serial product
6.44 8.55 (+2.11) 10.27 (+3.83)

Fifteen reflectors per panel is 32-57 µs of the panel's 173 µs — a fifth to a third, and
the rest is that each reflector is one 4096 x 15 pass over 0.5 MB on a shared memory
system.

What that means. Batching the reflectors is what the blocked level already does one
level up; the panel is what remains, and its chain is inherently sequential. What is
left to parallelise is inside one reflector, and the fork already does that — the cost
is a fresh rayon region per reflector with the pool parked in between. Reusing the
region across the chain is a caller-owned work model, i.e. the ledger's Thread policy
row (tenferro-rs#2000, strided-rs#6), not a threshold. Hence the measurement instead
of half of the change.

Recorded, not taken: the unblocked m x 16 QR is 34% slower threaded at m = 1024
and 17% at 2048 (0.0535 -> 0.0719, 0.1004 -> 0.1171) and pays only from m = 3072
(0.1483 -> 0.1423, 0.1958 -> 0.1733), while the rank-one arm's 8192-element floor is
active from m ≈ 546. That floor is load-bearing where it was measured (fa22a69), so
it was not moved; whether the loss is the region or the arm's column split is not
separated here.

Record: docs/worklogs/2026-10-14-tall-panel-region-cost.md. Ledger row DROPPED.

Limits: four physical cores, so the eight-thread column is eight workers on four cores.
These are f64 numbers through faer's own API; the campaign's 4096 x 256 b1 c64 cell is
c64 through tlinalg's provider and its 13.4 ms / 5 ms panel are not reproduced here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant