Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
14cd4f3
feat(native): field-table records, workspace, probe and schemas (SEP …
jtravs Nov 16, 2026
35dfa32
refactor(native): read the march and watch records by their tables
jtravs Nov 16, 2026
218aabb
test(native): the engines and the fault hook over a workspace (SEP 52)
jtravs Nov 16, 2026
e81c220
test(native): a raw pattern for the reading's refusal
jtravs Nov 16, 2026
144dc02
Merge branch 'sep52-p4a' into sep52-p4b
jtravs Nov 16, 2026
6b4716d
refactor(native): the adapter on Workspace, start(run) and probe(star…
jtravs Nov 16, 2026
da4b5e6
test: port the native tests to the workspace seam; the split sums in …
jtravs Nov 16, 2026
4f675c4
test(sessions): native's AcceptRecord carries each step's split sums …
jtravs Nov 16, 2026
a70d32b
build(native): generate the whole _core and _testing stubs with stubg…
jtravs Nov 16, 2026
5a4eb9c
test(native): every designated initializer of the workspace's setup
jtravs Nov 16, 2026
ee3fc8e
docs(native): the binding's rules; a changelog fragment for the works…
jtravs Nov 16, 2026
0921ac5
build(native): the stub script within the line length
jtravs Nov 16, 2026
09f1ad0
perf(native): a run's initial field crosses once, borrowed for the st…
jtravs Nov 16, 2026
877da66
perf(native): a run reads the workspace's live counters, not its diag…
jtravs Nov 16, 2026
606376f
Merge branch 'feature/sep-0052-backend-shape-p2' into sep52-p4b
jtravs Nov 16, 2026
2402d86
perf(native): read a record in one pass, by interned names and cached…
jtravs Nov 16, 2026
2ead066
perf(native): per-plane metadata and cap reads stop draining the stat…
jtravs Nov 16, 2026
67af9d3
Merge branch 'sep52-p4b' into feature/sep-0052-backend-shape-p4
jtravs Nov 16, 2026
a65c96a
test: engine-level parity over both backends' engines; records by nam…
jtravs Nov 16, 2026
aa24987
chore(native): cite the reference's session and workspace, not the de…
jtravs Nov 16, 2026
6041fff
docs: the native seam, engine-level parity and ADR-079 (SEP 52 phase 5)
jtravs Nov 16, 2026
095e344
chore: remove two stray arrays a test collection wrote at the root
jtravs Nov 16, 2026
0045de8
docs(sep-0052): report milestone 4 (phases 4 and 5) [skip ci]
jtravs Nov 16, 2026
52d4ca7
Merge branch 'feature/sep-0052-backend-shape-p3' into feature/sep-005…
jtravs Nov 16, 2026
72502d9
test: narrow the launch field before its use, for the type check [ski…
jtravs Nov 16, 2026
ef79026
docs(sep-0052): milestone 4's verification [skip ci]
jtravs Nov 16, 2026
7869786
docs(sep-0052): link milestone 4's pull request
jtravs Nov 16, 2026
2a4b5d1
Merge branch 'feature/sep-0052-backend-shape-p3' into feature/sep-005…
jtravs Nov 16, 2026
8e9b3f4
refactor(native): basis_rows and trial_tables are test entry points i…
jtravs Nov 16, 2026
c602518
Merge branch 'feature/sep-0052-backend-shape-p3' into sep52-p4-helpers
jtravs Nov 16, 2026
514b5d1
fix(native): the strict native type check on the new seam's code and …
jtravs Nov 16, 2026
1b54a67
fix(native): device compilers and clang-tidy accept the field tables …
jtravs Nov 16, 2026
2872c35
fix(native): nvcc compiles the problem groups' setters; the workspace…
jtravs Nov 16, 2026
3732fe2
fix(native): clang-tidy accepts the new binding and record converter …
jtravs Nov 16, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed -q.npy
Binary file not shown.
Binary file removed -q.npz
Binary file not shown.
227 changes: 0 additions & 227 deletions benchmarks/adams_host.py

This file was deleted.

7 changes: 5 additions & 2 deletions benchmarks/device_split.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ def _calls(nx: int, steps: int, planes: int) -> dict[str, Any]:
problem, request, backend = _native(_simulation(nx, steps, planes, None))
geometry = problem.transform.geometry
x, y = geometry.axes
state = backend._native_state
state = backend._workspace
try:
with backend.prepare(problem, request).start(
Start.entrance(problem), owns=False
Expand Down Expand Up @@ -297,7 +297,10 @@ def _calls(nx: int, steps: int, planes: int) -> dict[str, Any]:
),
}
session.acknowledge(batch.receipt)
crossings = {"field_to_host": _timed(state.field_to_host, 3), **exports}
crossings = {
"field_to_host": _timed(lambda: _testing.field(state), 3),
**exports,
}
# A width's parts: the fluence and its moments, one native call; and what the
# host's azimuthal average of a Gaussian's fluence takes on this machine.
widths = {
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/native_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def _once(
_counters.disable()
# The field bytes through the state's crossings, each way (SEP 44): a device's
# plane exports and loads, or a host build's copies.
to_host, from_host = session._backend._native_state.crossed_bytes()
to_host, from_host = session._backend._diagnostics()["crossed_bytes"]
record: dict[str, Any] = {
"crossed_to_host": int(to_host),
"crossed_from_host": int(from_host),
Expand Down
13 changes: 13 additions & 0 deletions benchmarks/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import importlib
import importlib.metadata
import logging
import os
import shutil
import sys
import tempfile
Expand All @@ -45,6 +46,7 @@
__all__ = [
"HOST_SPACES",
"SNAPSHOT_CAPACITY",
"WINDOW_SETTING",
"Diagnostics",
"count",
"emit",
Expand Down Expand Up @@ -243,6 +245,12 @@ def __exit__(self, kind: type[BaseException] | None, *rest: object) -> None:
raise SuiteError(msg)


WINDOW_SETTING = "SOLPROP_BENCHMARK_WINDOW"
"""``run`` times a run from before its load (``ab --baseline-env`` and
``--candidate-env``); unset, the window starts once the backend's load returns, as the
recorded history's does."""


def timed_run(
simulation: Simulation,
problem: PropagationProblem,
Expand Down Expand Up @@ -312,6 +320,11 @@ def timed_run(
problem, engine, handler, start=Start.entrance(problem), **observed
)
before, loaded_at = loaded.calls, loaded.ended
if os.environ.get(WINDOW_SETTING) == "run":
# The whole run, its load included: two builds that load the state at
# different points (before the session, or in its start) then time the
# same work. The history's window stays the default.
loaded_at = began
ended = time.perf_counter_ns()
seconds = (ended - loaded_at) * 1e-9
after = source_calls(engine)
Expand Down
1 change: 1 addition & 0 deletions changelog.d/sep-0052-native-workspace.changed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
solprop-native's private extension takes one workspace per backend, built from one problem record that carries every set-once table, and starts each run from one run record and each timing probe from the run's start (SEP 52): the per-call configuration of the old native state is gone, records cross by field table and are refused by field path, and both stubs of the extension are generated. A backend whose low-storage timing probe advanced its registers now refuses a further run or probe by name instead of running from the discarded registers.
6 changes: 5 additions & 1 deletion docs/dev/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,11 @@ class Backend(Protocol):
response teams, deterministic plasma scans and device reductions and is qualified on
data-centre NVIDIA GPUs; the HIP build is qualified on AMD Instinct GPUs, with the HIP
sanitizer run still outstanding. The private state is read only by the backend's own
session and timing probe. Its floating-point licence is
session and timing probe. The binding is small (SEP 52, ADR-079): a `_core.Workspace`
built from one `_core.Problem`, a run started from one run record (`start(run)`), the
probe (`probe(start)`) and one `diagnostics()` record; every record crosses by its
field table, the binding only marshals, and test-only entry points live in the
private `_core._testing`. Its floating-point licence is
[SEP 25](seps/archive/sep-0025-rounding-level-reproducibility.md)'s: contraction by default,
strict opt-outs for the protected helpers (stable increments, small-argument functions,
defects, compensated sums), reassociation only on the loops of a kernel that asks for it,
Expand Down
Loading
Loading