Repository navigation
Conversation
…CONNECTIVITY BECOMES MULTITHREADED
asv preimports the benchmark suite before it runs any setup_cache (asv/runner.py, spawner.preimport() ahead of the run loop), so on a cold cache bench_connectivity's import-time preload_topologies is what fills it -- serially, in the forkserver parent, before a single benchmark starts. CachedFixtures.setup_cache then finds everything already built, and prime(workers=...) never runs on the path it was written for. Filling it from the CLI first puts those reads back in the parallel prime. Worth a second or two on the GitHub runners, which only see the oQU grids; worth rather more on a machine that can reach the four dyamond grids on campaign storage. Co-Authored-By: Claude Opus 5 <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
ASV BenchmarkingBenchmark Comparison ResultsBenchmarks that have improved:
Benchmarks that have stayed the same:
Benchmarks that have got worse:
|
Main now carries squash-merged versions of work this branch had unsquashed (cached benchmark I/O UXARRAY#1700, lazy/cached neighborhood kernels UXARRAY#1708/UXARRAY#1768, asv env installs UXARRAY#1776, connectivity peakmem benchmarks UXARRAY#1661). Conflicts resolved in main's favor except where the branch adds sharding: - asv-benchmarking-pr.yml: keep the sharded setup/shard/merge jobs; adopt UXARRAY#1776's asv env cache key (ci/environment.yml + asv.conf.json, no restore-keys) in both jobs; drop a duplicated CPU topology step. - asv-benchmarking.yml: take main's unguarded fixture priming; apply the same env cache key fix. - asv.conf.json: take main's matrix and comments; keep the branch's BLAS thread pins in env_nobuild. - .gitignore: keep the per-shard config/results entries. - bench_connectivity.py: accept deletion; superseded by connectivity.py. - neighbors.py, _fixtures.py, _warmup.py, mpas_ocean.py, geometry_samebody*: take main. Co-Authored-By: Claude Opus 5.5 <[email protected]>
cmd/bench_io is stale: its content landed on main as UXARRAY#1700 and has since been superseded there (UXARRAY#1768 neighborhood kernels, UXARRAY#1776 asv env). This branch already carries main, so every conflict resolves to the branch's side and the tree is unchanged; the merge only records bench_io's history so PR #2 against it is mergeable. Co-Authored-By: Claude Opus 5.5 <[email protected]>
asv continuous is the same interleaved run plus a comparison, and exits 1 when the comparison finds a regression -- the status it also uses for a broken run -- so any slower benchmark failed its shard (shards 0 and 1 in run 37510066776). Shards now only measure; the merge job compares. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The main merge left a duplicate warm_in_parent import and a docstring-only diff against main; both files now match main. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Text only: module docstrings cut to purpose, key constraints and usage; comments to one or two lines of why. Fixes two that had drifted from the code (a stale stderr claim in _threads.resolve, a contradictory matrix note in asv.conf.hpc.json) and a comment above the wheels cache that described the durations cache. Co-Authored-By: Claude Opus 5.5 <[email protected]>
NeighborhoodReduce ran at r=15, where a 120km face has ~600 neighbors and time_dataset_reduce alone took over a minute per round -- the class that bounded the slowest shard. It now runs at 5, shared with NeighborhoodDask as NEIGHBORHOOD_RADIUS. NeighborhoodBuild swept r over 1, 5 and 15 for every benchmark. The timings now skip 15 (1.3s per call at 120km) and the track_* benchmarks skip 1, where peakmem and nbytes barely move (362k vs 384k at 480km). asv reads params from the method first, so this stays one class and the kernels still compile once. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Same shards, caches and pre-builds; about 630 fewer lines. - _merge: union rows and max durations. Every shard's benchmarks.json already lists the whole suite (asv saves all it discovers), and the conflict, ordering and column-realignment paths were unreachable. - _partition: group by class. No setup_cache outside _fixtures spans classes, so the union-find never merged more. --shard now implies --asv-args; the uncalled --bench-args and --config-out are gone, and the report lists the heaviest benchmarks in place of the workflow's inline script. - _machine: write asv's detected specs under the pinned name directly, replacing `asv machine --yes` plus a rename. - Drop the unused _threads.py and asv.conf.hpc.json. The latter had drifted from asv.conf.json (no conda_environment_file), so HPC runs built a different env than CI. stage.pbs now always sets NUMBA_NUM_THREADS (default 8; numba's default counts SMT siblings) and passes -a timeout=1800. - local.sh pins each shard to whole physical cores in socket order, so concurrent shards no longer share SMT siblings on nodes that number them N and N + cores. - PR workflow: YAML anchors for the steps repeated across jobs, one SHARDS setting, and a shorter baseline resolution. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ns from main asv_runner re-runs setup before every sample, about six times per benchmark process. NeighborhoodReduce.time_reduce timed a 5ms kernel at 120km but took 27s, and NeighborhoodDask.time_mean 49s for 1-40ms calls, almost all setup. That made NeighborhoodReduce alone larger than a quarter of the suite, which capped a 4-shard split at 3.2x. - NeighborhoodReduce and NeighborhoodDask build their fixture, warmup and neighborhood once per process. The timed calls only read them. The grid caches a single ball tree and time_dataset_reduce leaves it on edges, so setup restores the face tree each sample, as a fresh setup did. - main's benchmark workflow saves the commit it just ran under the asv-results cache key. PR caches are scoped to their PR, so every PR's first run had no durations and split by count (this branch's first run: shards of 3:11, 4:48, 2:17 and 9:49). Co-Authored-By: Claude Opus 5.5 <[email protected]>
- _merge: seed each file from the first shard that has it and fold later shards' results in, telling result files by their "results" key rather than a list of whole-file names. rel is now relpath, since keys keep the machine directory. - The results artifact is named with runner.os again, as on main. The comment workflow still downloads asv-benchmark-results-Linux. Co-Authored-By: Claude Opus 5.5 <[email protected]>
load_weights keeps every sample, so the median costs nothing over the mean and ignores a single cold-numba outlier once there are three or more, as in a local results dir with history. CI restores two samples per benchmark (base and PR), where the two agree. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Skip machine.json by its missing "results", as _merge does, and index result_columns without a fallback: every v2 results file (asv >= 0.5) has a duration column, and asv itself won't read a v1 file without asv update. The median doesn't depend on order, so the glob needn't be sorted. Co-Authored-By: Claude Opus 5.5 <[email protected]>
benchmark_classes maps each class (or module, for a bare function) to its (benchmark name, cost) pairs, and class_costs to their total, in place of classes, class_cost and owner. Plans are unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
Companion to UXARRAY#1700
Overview
PR Checklist
General
Testing & Benchmarking
Documentation and Examples
docs/api.rst; internal (private) function names start with an underscore (_)AI Disclosure
AI Usage: Claude Opus 5