Skip to content

Add ordinary SYNC.CORE with independent PE contexts - #373

Merged
zhoubot merged 1 commit into
mainfrom
codex/issue-360-sync-core
Oct 10, 2026
Merged

zhoubot merged 1 commit into
mainfrom
codex/issue-360-sync-core

Conversation

@ckwllawliet

@ckwllawliet ckwllawliet commented Oct 9, 2026 •

Copy link
Copy Markdown
Collaborator

Add ordinary operand-free SYNC.CORE with independent PE contexts, a common four-PE kernel entry, and participant-pair ordering after earlier relevant GM work completes. This implements #360 and ADR-SCALAR-0007 without changing FENCE.D/FENCE.I or introducing a target profile.

The owning ASL covers exact SYS envelope validation, irrevocable arrivals, delayed GM obligations, interrupt/recovery isolation, invocation cleanup, and Shared producer completion. Current meanings remain in the ASL/NDF owners inventoried in ADR-SCALAR-0007. Compatibility: additive/compatible. Release impact: required; exact-commit full release verification and downstream LLVM/model adoption remain outstanding.

The branch is reconciled with merged #369, retaining TLEA closed-schema validation, M32 complete-pair checks, and independent PE dispatch. It also restores the frozen 0.58.7 manifest, ABI/encoding evidence, and generator inputs accidentally changed by the draft #369 projection; current draft counts remain 467 Scalar forms and 119 Tile operations. #341 remains a separate unconsumed lifetime change.

Independent review: /root/review_373, approved with zero findings. Final base e145c45c674fdc41b0b71564abf0e0433a6be29b; head 9643e9e83420653e21f9faebad492c641c262ee2; tree 371d519df900b3e8b5a0d89afd4cc841cc08f6c9; diff SHA-256 3667c4daf41172345c31b03d605253302dfc6c2ff7bf74aad1ec7e65f924beb4. One signed commit; exact input receipt validated by scripts/prepare-pr. Local reviewer identity is an execution record, not GitHub approval.

Validation: 12/12 focused ASL overlap points; targeted Python 26 tests with one expected skip; make pr-check 11 checks; make repo-check 7 checks; reader/projection validation and git diff --check pass. Final signature-only squash preserved the exact tested tree; hosted required checks run on the pushed head. Prior original-branch 101-point semantic evidence remains source-bound historical evidence, not a new complete-model run.

No release, tag, site publication, downstream implementation, or full-model conformance is claimed. Inherited site-security advisories and the new helper's pending reader guide remain separate obligations.

@zhoubot
zhoubot force-pushed the codex/issue-360-sync-core branch from 47666ac to 9643e9e Compare October 10, 2026 09:57
@zhoubot
zhoubot enabled auto-merge (squash) October 10, 2026 09:57
@zhoubot
zhoubot merged commit 5641479 into main Oct 10, 2026
3 checks passed
@zhoubot
zhoubot deleted the codex/issue-360-sync-core branch October 10, 2026 10:01
zhoubot added a commit that referenced this pull request Oct 10, 2026
Canonical `THREAD_ID` at `0x0026` now reports the executing PE index
0–3, letting code launched at the common entry distinguish PE0 from
workers. Previously every PE read zero. This implements the PE-identity
decision for #150 on top of merged #373's independent PE contexts and
common kernel entry.

The value is derived from execution context rather than mutable saved
register storage. The existing SYS-block placement, read-only
permissions and unknown-address rejection remain enforced; `0x0802`
stays unassigned. The change includes owning ASL, projected
catalog/documentation, bilingual reader guides, the ADR-STATE-0008
amendment, and independent AVS.

Normative owner: `asl/scalar/model/sys/semantics.asl`, clause
`PTO-THREAD-ID-PE-IDENTITY-001`. Related owners: system-register data
types/reset and PE execution context. Decision baseline:
`e182c9b70d54a3a264bac54af9b915a0e43bb519`. Compatibility is
**breaking** for software relying on zero on PE1–PE3; PE0 and all
instruction encodings/access classes are unchanged. Release impact is
required; no release or publication is claimed.

Validation includes a four-PE regression that failed on the old
implementation, then passed with the fix. Eight focused ASL points cover
decoded SSRGET/HL.SSRGET at all ACRs, encoded write/swap rejection,
retired-address and Standard-block rejection, actual interrupt recovery
and fault retry, Core/PE selection, reset/relaunch, and affected
existing reset/Shared-memory behavior. Bilingual guide semantics and
translation were independently accepted by `/root/review_369` and
verified by `/root/review_373` before attestation.

LLVM/TileOP must emit canonical `THREAD_ID` in a legal SYS envelope;
changing only the old address in a Standard Block is insufficient.
Runtime startup must branch from the common entry before entering libc.
Downstream compiler/runtime/model updates and regenerated ELF validation
are still required.

Refs #150. This PR deliberately does not close that integration issue:
the complete hosted stack/TLS/libc/fd/exit/ELF ABI, runtime-only
carrier, and same-ELF independent-golden gfrun/QEMU matmul acceptance
remain unverified. Historical runtime passes and the previous
separate-entry ABI do not validate this contract.

Final independent exact-input review: `/root/review_369`, APPROVE, zero
findings, compatibility **breaking**. Base
`0d4464a03f761ed113078c750010f445300e7568`; head
`db5239b82e9e1d73ccb64c86dbd6314cb43f0a5b`; tree
`6c584118748c304ea8efe03465c258602a85e1cc`; diff SHA-256
`9f8b8cd3d91951c889f0ac285852681fe8ed66f3ed4e41a2d47362e214cd1383`.
Receipt verified by `scripts/prepare-pr`; reviewer execution identities
are not GitHub approvals.

Final local evidence: `make pr-check` 11/11; `make repo-check` 7/7;
focused ASL 8/8. These results are reused against the byte-identical
semantic/documentation patch after rebasing on #368's two dependency
files; 19 site-contract tests additionally passed on the updated base.
All three commits are signed. Fresh hosted checks apply to the pushed
head. Exact-commit full release validation remains outstanding.

---------

Co-authored-by: zhoubot <637081+zhoubot@users.noreply.github.com>
zhoubot added a commit that referenced this pull request Oct 10, 2026
Adds independent Local `B.IOT` and Shared `B.IOS` source lifetime
markers for #340 and #347, reconciled with #373's independent PE
execution. A first-finishing PE can no longer retire Shared data that
another declared participant still needs; GMOV retires the selected
source PE's Local generation.

## Contract and compatibility

- Ordinary bare sources declare last-use; `.reuse` retains payload. The
`L` bit remains the stream terminator. Existing binary words retain
their old meaning; **reassembling legacy bare-source text changes
behavior**.
- Local retirement preserves descriptor, vtag, relative identity, and
other PE banks. ExecutionMask carriers are excluded. `B.ASSEMBLE`
continuation ParentRefs require reuse.
- Shared occurrence records track the exact Core, invocation, origin,
privilege, instruction site, selectors, generation, and participant
mask. Retirement waits for all declared participants and outstanding
occurrences; recovery invalidates only the affected PE's
acknowledgement. Publication cannot overwrite a pinned generation.
- GMOV captures immutable source-PE/index/generation selections,
including repeated peers. Fault/retry and nonparticipant execution
preserve payload. Zero-row cooperative TMATMUL acknowledges Shared
completion without Local effects.
- Amends ADR-BLOCK-0013 and ADR-BLOCK-0015 with the maintainer-approved
participant-aware decision against baseline
`f3fa24331df452248366550f71cd1be22e62aeb1`. Owning clauses include
`PTO-ARCH-LOCAL-VTAG-LIFETIME-001`, `PTO-ARCH-SHARED-VTAG-LIFETIME-001`,
and `PTO-B-SOURCE-LIFETIME-PE-COMPLETION-001`.

The ASL owners, catalogs, decoder/AVS projections, bilingual instruction
guides, strict layout census, and state inventories are reconciled
together. Draft inventory: 105 Block forms and 572 encoded forms. Binary
fingerprint:
`905c5cae908ed320dd214dc700f08dcb8231dff52f5933a5b1346ac36b987455`.

## Validation

Final head: `5b27cdab976fc648b899fecc8fd49a6dee76d4c5`; base:
`f3fa24331df452248366550f71cd1be22e62aeb1`.

- 29/29 focused ASL points passed on semantic commit
`4b46edef2ccb490cbb0d8754deacc7713168d857`; subsequent commits change
tooling, tests, and the census only. ASL and runner inputs are
unchanged.
- Red/green evidence covers premature Shared retirement, wrong-bank GMOV
retirement, and zero-row TMATMUL acknowledgement.
- Strict census mutation canaries reject wrong helper owners, added
callers, and layout-bearing changes.
- All 14 changed English/Chinese guide pairs have separate review and
verification receipts.

- `make pr-check`: 11/11 PASS, including the full Python suite.
- `make repo-check`: 7/7 PASS, including 572-form binary closure.
- Site typecheck and 14/14 unit tests PASS; English and Chinese
production builds PASS with `NODE_OPTIONS=--max-old-space-size=16384`
after the default heap ran out of memory.
- `git diff --check` PASS. One independent reviewer approved this exact
base/head/tree/diff with no findings; `scripts/prepare-pr --review`
accepted the receipt. This receipt is local, unauthenticated review
evidence, not GitHub approval.

The suggested broad ASL matrix is not claimed as fully executed; the 29
focused points above are the executed subset.

## Downstream and release obligations

Landing order remains PTO-SPEC → LLVM → ASL-MODEL → SuperScalarModel.
Related implementation work: [LLVM
#108](LinxISA/llvm-project#108) and
[SuperScalarModel
#846](LinxISA/SuperScalarModel#846). Downstream
runtime and same-ELF independent-golden coverage remain development
obligations.

The nine added command forms are recorded as **missing/divergent** in
historical executable-model comparison evidence; no execution or ABI
acceptance is fabricated. Frozen 0.58.7 artifacts remain unchanged. Full
exact-commit release validation is pending; this PR does not claim
release readiness or close the full hosted ABI issue #150.

---------

Co-authored-by: zhoubot <637081+zhoubot@users.noreply.github.com>
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.

2 participants