Skip to content

docs: accept SEP 48, a Julia execution backend - #609

Merged
jtravs merged 11 commits into
mainfrom
docs/sep-0048-julia-backend
Nov 10, 2026
Merged

jtravs merged 11 commits into
mainfrom
docs/sep-0048-julia-backend

Conversation

@jtravs

@jtravs jtravs commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Accept SEP 48, an optional Tier 3 Julia backend implementing SEP 47's complete execution-session contract on CPU, CUDA, ROCm and Metal. John Travers reviewed and accepted the proposal, approved the implementation-plan revisions, and delegated this proposal's acceptance and merge.

The acceptance revision makes setup identity and selection explicit, adds the execution-only SimulationSettings.backend_options mapping, requires artifact-completeness checks before Julia loading, and defines main-thread initialization and atomic stop ownership. DF32 admission bounds actual replay and Adams-history spans, including restored history. Input noise is binary64 only; every binary32 path, including Metal, continues to refuse noise. Physics defaults are unchanged.

Production adapter integration waits for SEP 47's merged descriptor/request split and generic preparation entry point. Package/setup work can start independently. Implementation will use one draft PR; that PR will be left ready for maintainer review rather than merged automatically.

The maintainer accepted a process-wide limitation in Julia 1.13.3: after Julia starts, SIGTERM may terminate the application without final output or a checkpoint, including with custom or ignored Python handlers. The proposal retains actual Python SIGINT handling and lifetime-owned atomic stop tokens. Issue #610 stays open to revisit signal preservation with stable Julia 1.14 and compatible device packages; it no longer blocks this SEP under the accepted policy.

Status: Accepted. Review: Reviewed (John Travers, human; GPT-6, AI). Implementation: package preparation only; production session work remains gated by phase 1 probes.

Tracks #608; requires #588 and the preparation changes in #607. Related: #559, #368, #557, #560, #590, #561, #333, #356 and #596. This documentation PR closes no implementation issue.

Validation on the acceptance tree:

  • git diff --check and codespell on the three changed documents pass.
  • pytest tests/test_seps.py: 349 passed, three expected process-SEP skips.
  • poe docs: Sphinx builds cleanly with warnings as errors, using the lightweight environment.
  • Independent acceptance-diff review completed; its requested phase/test assignments are included.

Separate macOS arm64 runtime feasibility probes confirmed foreign-thread atomic cancellation during threaded GC and restored custom SIGINT handling. They also independently reproduced fatal SIGTERM despite ignored/custom Python handlers; the maintainer explicitly accepted that limitation before merge. The amendment passed independent review. No propagation, GPU qualification or full code gate was run for this documentation-only change.

jtravs and others added 3 commits November 10, 2026 12:04
An optional backend="julia" at Tier 3: one Julia engine for CPUs and
NVIDIA, AMD and Apple GPUs, in binary64 and binary32 (SEP 33), owning
SEP 47's whole execution session. pip install solprop is unchanged; the
julia extra adds only juliacall, and `solprop julia setup` installs a
pinned Julia and committed environments, refused until run. Includes the
merge scope, the Julia code rules and tools (Runic, Aqua, JET), CI,
verification, phases and open questions Q1-Q7.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Solprop-managed environments with committed manifests; a per-run
SimulationSettings.device, with GPU packages loaded on demand through
package extensions from stacked environments of one joint resolution,
which native checks against its build; the Julia CI job on every
non-docs PR; `solprop julia setup`/`status` over Python functions; Linux
x86-64 and macOS arm64 qualified; the full section 5.3 scope at merge;
Julia 1.13 pinned by patch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jtravs jtravs added documentation Improvements or additions to documentation area: backends Across backends, and numba_cpu labels Nov 10, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-10T15:42:21.739591Z da2e699 New commits
🔒 Security Review ✅ Completed 2026-11-10T15:43:45.546763Z da2e699 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@jtravs jtravs mentioned this pull request Nov 10, 2026
1 of 6 tasks

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7428570932

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/dev/seps/sep-0048-julia-backend.md Outdated
Comment on lines +713 to +717
- **Adaptive runs** take the same accepted steps, with the same control trace on equal
readings (SEP 47 §4.3).
- **Fields and every statistic** agree within bounds derived from the operations'
summation counts ([testing.md](../testing.md)). The experiment's windows agreed to
$10^{-13}$ or better.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Separate adaptive accuracy checks from identical-input control tests

For independently adaptive Julia and NumPy runs, rounding differences in reductions can legitimately change accepted steps and orders, so requiring identical accepted steps and summation-based field bounds would reject correct implementations. SEP 47 §4.3 explicitly permits different accepted step counts and requires identical control decisions only when fed identical recorded readings. Specify per-case accuracy envelopes against a tighter or converged reference for adaptive runs, retain rounding budgets for matched discrete histories, and test identical-input control traces separately. This also follows the numerical-comparison requirement in AGENTS.md.

AGENTS.md reference: AGENTS.md:L343-L346

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in ab619ef.

  • §4 now defines three comparison classes:
    • M, matched discrete histories, with SEP 25 §§4.3–4.4 rounding budgets;
    • A, independent adaptive runs, against a converged reference within an rtol-set envelope, each backend counting its own work exactly;
    • C, control identity on recorded readings, per SEP 47 §4.3.
  • §7.1 assigns every comparison to one of these classes, including groups, repeat runs and each kind of resume.
  • The requirement for equal accepted steps in adaptive runs is removed.

The GPT-6 review raised the same point as R1. Part III records the response.

@read-the-docs-community

read-the-docs-community Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1578994e99

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/dev/seps/sep-0048-julia-backend.md Outdated
Comment on lines +585 to +586
- the shared helpers (Chebyshev rows, Adams basis) bit for bit against recorded
values;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Compare numerical helpers using rounding bounds rather than bits

For independently computed Chebyshev rows and Adams bases, this requirement would reject valid Julia implementations whose rounding differs from the recorded values. The existing tests/test_helpers.py::test_points_agree_with_the_plain_form asserts an operation-derived bound and records bitwise agreement only as information. Specify similarly justified bounds for Julia, retaining exact comparisons only for structural results; otherwise the proposed blocking suite contradicts the repository's numerical-comparison contract.

AGENTS.md reference: AGENTS.md:L337-L342

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Accepted, fixed in cf7e0c1. §6.6's Core group now compares the Chebyshev rows and the Adams basis with the plain Python forms within operation-derived bounds, as tests/test_helpers.py::test_points_agree_with_the_plain_form does. Bitwise agreement is recorded as information, not asserted, and exact comparison is kept for structural results only: refusals, the refused position and NaN propagation.

Comment thread docs/dev/seps/sep-0048-julia-backend.md Outdated
- CPUs at 1 thread and the default budget: Apple M5 Max, Intel Xeon Gold 6240 and AMD
EPYC 7763;
- each GPU of §7.4, binary64 and binary32.
- **Whole runs** on two cases per machine.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Remove full-length runs from the qualification requirements

Requiring two whole runs per machine makes full-length propagation part of this change's qualification, because §7.6 explicitly requires the §7.5 records before merge. This conflicts with the repository's short-window qualification policy, which permits complete release tracking only as a separate activity, never as change qualification. Replace this requirement with short windows or move whole-run measurements to separately invoked release tracking outside the merge checklist.

AGENTS.md reference: AGENTS.md:L125-L137

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already fixed in ab619ef, under the maintainer's decision on R10: whole runs became optional and are listed as not required for merge in §7.6. cf7e0c1 goes further: §7.5 now says whole runs are not part of this SEP's qualification at all. Like python -m benchmarks track, they are run separately by hand, never as a change's qualification.

Comment thread docs/dev/seps/sep-0048-julia-backend.md Outdated
Comment on lines +522 to +524
- At run time solprop points `juliacall` at that Julia and environment through
`PYTHON_JULIACALL_EXE` and `PYTHON_JULIACALL_PROJECT`, which bypasses juliapkg's
resolution.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Pin compatible JuliaCall and PythonCall versions together

When the Python extra selects a different juliacall release within its tested range (§5.1) from the PythonCall.jl version pinned in the committed manifest, this override bypasses the resolver that would reconcile them. The JuliaCall existing-environment documentation explicitly requires PythonCall.jl to match the JuliaCall version and states that loading Julia otherwise fails. Thus a successful setup can still leave the backend unusable, including across virtual environments sharing the depot. Specify matching bridge-version pairs and validate them before startup rather than independently allowing a Python version range and one fixed Julia manifest.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in ab619ef, the same point as R4 of the GPT-6 review. The julia extra pins juliacall exactly to the release paired with the manifests' PythonCall.jl (§§5.1, 6.10). The pair is part of the setup's identity and is checked before the runtime starts; a mismatch is refused by name. That check also covers several virtual environments sharing one setup, which §6.5's tests exercise.

Comment on lines +304 to +305
- The setup can run on an HPC login node and be used offline on compute nodes that
share the file system.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Materialize CUDA artifacts during GPU-less setup

On an HPC login node without a CUDA driver, the specified manifest instantiation and precompilation do not establish the promised offline GPU environment. The CUDA.jl precompilation documentation explains that without a driver, neither runtime nor compiler artifacts are selected or downloaded unless a toolkit version is explicitly configured. Consequently, setup can finish successfully while the first CUDA run on an offline compute node cannot compile kernels or load its runtime. Require setup to select the target toolkit and materialize its required artifacts before recording completion, and verify the workflow with networking disabled on the compute node.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in ab619ef, the same point as R5 of the GPT-6 review.

  • Setup gains --cuda-runtime, so it can select the CUDA runtime on a node with no GPU or driver.
  • It fetches and verifies every artifact, lazy ones included, before publishing the environment.
  • Runs keep Julia's package manager offline, so a missing artifact is a setup refusal by name, never a download attempt.
  • The CUDA qualification pass (§7.4) prepares the setup on a GPU-less node, then makes the first GPU run with networking disabled.

Answer every point of GPT-6's review and the automated review's matching
finding, with the maintainer's decisions on R3, R8 and R10, and revise
Part I: comparison classes M, A and C; the double-float algorithms,
hypotheses and witnesses quoted exactly (the sloppy addition and the
unanalysed division replaced); a phase domain with a three-word range
reduction and an admission refusal above it; an exact juliacall pin;
complete offline artifacts; per-vendor prerequisites (system ROCm); a
setup identity with copied engine sources, locking and atomic
publication; the signal policy and its phase 1 probes; taper and resume
scope; short-window survival tests and mandatory records. Still Draft.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ab619ef630

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/dev/seps/sep-0048-julia-backend.md Outdated
Comment on lines +902 to +906
- **Class M, a matched discrete history:** fixed schedules, replays and fixed-order
methods. Both backends take the same steps by construction. Fields and every
statistic agree within SEP 25's rounding budget: the operation counts, with the
conditioning and propagated sensitivity of what is compared (SEP 25 §§4.3–4.4 and
[testing.md](../testing.md)). Each budget is derived in a comment beside its test. The

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Classify ordinary variable-order replay as an accuracy comparison

For a Multistep replay, the revised Class M incorrectly assumes that sharing a step schedule matches the complete discrete computation. FixedSchedule records step lengths, not orders or rejected trials, and SEP 25 §4.4 explicitly explains that Adams replay still chooses orders and can therefore follow a different history. Requiring rounding-level agreement here would reject valid Julia replays even after the independent-adaptive checks were corrected. Classify ordinary variable-order replay as Class A, and reserve Class M for tests that explicitly match method, orders, startup and history.

AGENTS.md reference: AGENTS.md:L343-L346

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Accepted, fixed in cf7e0c1.

  • §4 now reserves class M for a fully matched discrete computation: the same prescribed schedule, a method that makes no discrete choice on it (Multistep(variable_order=False), the Runge–Kutta tableaux, RK4IP, the low-storage replay), and matched startup, restart history and save-plane handling.
  • It states, citing SEP 25 §4.4, that a Multistep replay is not class M, because FixedSchedule records step lengths only.
  • §7.1 places variable-order replay in class A, and so are groups, repeat runs and resumes whose method chooses orders. They are class M only when the method makes no discrete choice.

jtravs and others added 3 commits November 10, 2026 12:55
Phase 1 needs nothing; phase 2 needs #605's contract (merged) and is
better begun once #607 merges; phase 4 waits for #607. The branch starts
from main without stacking.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Variable-order Multistep replay is class A (SEP 25 section 4.4), class M
needs a fully matched discrete computation; the helpers are compared
within operation-derived bounds as tests/test_helpers.py does; whole
runs are outside the qualification. Part III answers all six Codex
findings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jtravs jtravs changed the title docs: draft SEP 48, a Julia backend docs: accept SEP 48, a Julia execution backend Nov 10, 2026
@jtravs
jtravs merged commit 04e7219 into main Nov 10, 2026
18 checks passed
@jtravs
jtravs deleted the docs/sep-0048-julia-backend branch November 10, 2026 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: backends Across backends, and numba_cpu documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant