Repository navigation
Track tensor4all-rs a515738, record allocations, and add a four-thread scaling sweep - #6
Merged
Merged
Conversation
added 4 commits
October 11, 2026 06:26
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three changes, in dependency order.
1. Allocation counters on every arm
Every record now carries
n_allocationsandallocated_bytesfor the timedoperation, median over the timed runs, from a
GlobalAllocwrapper insrc/alloc.rs. The counters expose the per-call overhead that the wall timehides. Case 1 at
input chi = 5:fitmakes 27x the allocation calls ofnaivefor the same result. Recordswritten before the counters omit both fields, and the report leaves their
columns blank, so the schema version stays at 1.
2. Move every tensor4all-rs pin to
a5157389e9aeda(2026-08-19) toa515738(main, 2026-10-10). All nine crates movetogether, and the revision also changes in
scripts/run_all.shand in theTENSOR4ALL_REVcache-key constant ofsrc/gaussian_input.rs, which theGaussian input cache keys on.
Two API migrations:
tensor4all_partitionedtreetn::PatchingOptions.rtolbecamecutoff, withcutoff = old_rtol^2(the new default1e-24is documented upstream as thebehaviour-parity translation of the superseded
rtol = 1e-12).tensor4all_partitionedtt::PatchingOptionsstill takes
rtol.src/patched_mpo.rssquares the tolerance at the three TreeTN call sites, sothe truncation budget is unchanged. No other call site needed a change.
On this machine, case 1 at
input chi = 5, against a local probe at the oldpin:
3. Optional multithreaded sweep
BENCH_THREADS=nruns the same three cases onnRayon, BLAS and tenferrothreads pinned to a contiguous core range, in its own
<machine>-<n>tprofile.AGENTS.mdand the README record that it is scaling evidence only: thesingle-core profile stays the source of truth and the two are not merged.
Sweeps in this PR
result/linux-ryzen-ai-9-hx-470andresult/linux-ryzen-ai-9-hx-470-4t, bothfrom source revision
05ebd78against tensor4all-rsa515738.Machine: AMD Ryzen AI 9 HX 470 with Radeon 890M, 12 physical cores and 24
hardware threads, 58.5 GiB RAM, Linux. The one-thread sweep is pinned to CPU 0;
the four-thread sweep is pinned to CPUs 0-3, which
lscpu -ereports as fourdistinct physical cores on this part.
The four-thread profile scales only where the work is large. It is slower than
one thread below roughly 40 ms per case, and 1.5x to 1.7x faster at the largest
Gaussian instances:
gaussian_mpo_contraction/global_fit/n=1280.2022 s to0.1195 s,
gaussian_elementwise/patched_fit/n=1280.4079 s to 0.2484 s,gaussian_elementwise/global_fit/n=1280.1537 s to 0.0980 s.Validation
cargo fmt --all -- --check,cargo clippy --locked --all-targets -- -D warnings,cargo test --release --locked(22 passed), andpython3 scripts/report.pyonboth profiles.
4. Lead the README to the results
There was no path from the README to a single number. The README now opens with
a
Resultstable linking every committed profile'sreport.md, with themachine, thread count and measured tensor4all-rs revision in the same row, and
result/README.mddescribes the layout of a profile directory and whichartifacts are generated.