fix(runtime): one deterministic PRNG sequence per seed across native JIT, native AOT and the VM (SW-113) - #554
Open
tsotchke wants to merge 3 commits into
Open
fix(runtime): one deterministic PRNG sequence per seed across native JIT, native AOT and the VM (SW-113)#554tsotchke wants to merge 3 commits into
tsotchke wants to merge 3 commits into
Conversation
tsotchke
enabled auto-merge (squash)
August 29, 2026 01:31
tsotchke
force-pushed
the
fix/issue-553-rng-seed-parity
branch
3 times, most recently
from
August 30, 2026 03:13
b6f2853 to
50c916b
Compare
…JIT, native AOT and the VM (SW-113) Fixes #553. Native code emitted libc drand48/srand48 while the JIT and runtime used the Eshkol wrappers, and an explicit srand48 did not suppress time-based reseeding, so a fixed seed produced different sequences under AOT and JIT. All three engines now share the canonical runtime PRNG; the VM gains random, srand48, set-random-seed! and tensor rand. Cross-engine tests pin the first eight outputs per seed, reseeding, negative and low-32-bit seeds, and the reported reproducer. Documentation and the VM parity manifest updated; ledger SW-113 closed.
…-surface manifest
tsotchke
force-pushed
the
fix/issue-553-rng-seed-parity
branch
from
August 30, 2026 09:01
7a0054e to
a35d822
Compare
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.
Fixes #553. Native code emitted libc drand48/srand48 while the JIT and runtime used the Eshkol wrappers, and an explicit srand48 did not suppress time-based reseeding, so a fixed seed produced different sequences under AOT and JIT. All three engines now share the canonical runtime PRNG; the VM gains random, srand48, set-random-seed! and tensor rand. Cross-engine tests pin the first eight outputs per seed, reseeding, negative and low-32-bit seeds, and the reported reproducer. Documentation and the VM parity manifest updated; ledger SW-113 closed.