Repository navigation
Fix 32-bit failures: Difference hash seed widening and optimal_svht Int32 - #688
Merged
ChrisRackauckas merged 3 commits intoOct 10, 2026
Merged
ChrisRackauckas merged 3 commits into
ChrisRackauckas merged 3 commits into
Conversation
Base.hash(::Difference, ::UInt) xored the native-width seed `u` against a bare literal (0x055640d6d952f101), which only fits UInt64. On 32-bit builds, where UInt == UInt32, this silently widens the xor result to UInt64, so the subsequent hash(D.t, ::UInt64) call on the SymbolicUtils term has no matching method (SymbolicUtils's hashconsing expects the platform's native UInt). Reducing the literal with `% UInt` keeps the result in the caller's native width on every platform. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Agent-Harness: Claude Code Agent-Model: claude-sonnet-5-5 Agent-Session: subagent of the qa-hygiene head session on amdci2
size(...) returns Int, which is Int32 on 32-bit Julia. optimal_svht was only defined for Int64, so Optimal Shrinkage in test/Core/utils.jl threw MethodError on the x86 Core lane after the Difference hash fix landed. Widen the signature to Integer so both architectures dispatch. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Cursor Agent <noreply@cursor.com> Agent-Harness: Cursor Agent CLI Agent-Model: auto Agent-Session: ~/sandbox/goals/ci-green/work/cig-x86/log.txt (local transcript, amdci2)
Call optimal_svht with Int32 arguments so unfixed Int64-only code fails on every platform, and rewrite the new test comments as invariants (no CI links or history narration). Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Cursor Agent <noreply@cursor.com> Agent-Harness: Cursor Agent CLI Agent-Model: auto Agent-Session: ~/sandbox/goals/ci-green/work/cig-x86/log.txt (local transcript, amdci2)
ChrisRackauckas
marked this pull request as ready for review
October 10, 2026 00:28
ChrisRackauckas
referenced
this pull request
Oct 14, 2026
Agent-Harness: Devin CLI 3000.11.3 Agent-Model: Fusion (Claude Opus 5.5 Medium + SWE-2 Medium) Agent-Session: local transcript ~/.local/share/devin/cli/transcripts/flash-hour.json Co-authored-by: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
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.
Please ignore until reviewed by @ChrisRackauckas.
Summary
Two genuine 32-bit bugs in DataDrivenDiffEq (not dependency build failures):
Base.hash(D::Difference, u::UInt)(src/difference.jl:41) xored the native-width seeduagainst a bare literal0x055640d6d952f101, which does not fit inUInt32. On 32-bit builds thexorsilently widens toUInt64, thenhash(D.t, ::UInt64)has no SymbolicUtils method (hashconsexpects nativeUInt). Fix:0x055640d6d952f101 % UInt.optimal_svht(m::Int64, n::Int64)(src/utils/utils.jl:6) —size(...)returnsInt(Int32on 32-bit), so Optimal Shrinkage intest/Core/utils.jlthrewMethodError: no method matching optimal_svht(::Int32, ::Int32)on the PR's x86 lane after (1) was fixed. Fix: widen tooptimal_svht(m::Integer, n::Integer; ...).This is unrelated to #680 (BFloat16s/NNlib i686). BFloat16s installed cleanly in the failing runs; these are DataDrivenDiffEq hashing / Int-width bugs.
Verification
Hash seed (julia +1~x86, no packages):
optimal_svht (julia +1~x86):
CI evidence: master run https://github.com/SciML/DataDrivenDiffEq.jl/actions/runs/35188714123 (hash MethodError); PR x86 job after hash-only commit still failed on
optimal_svht(::Int32, ::Int32)intest/Core/utils.jl:20.Risk assessment
Differencehash (discrete-time ops) andoptimal_svht/optimal_shrinkage(SVD threshold). No public API signature removals;Integeris a strict widening ofInt64.implicit_basis.jlon x86 CI.🤖 Generated with Cursor Agent CLI (model: auto) — session: local transcript ~/sandbox/goals/ci-green/work/cig-x86/log.txt on amdci2
🤖 Hash-seed fix (6c1d2a3) generated with Claude Code (model: claude-sonnet-5-5), subagent of the qa-hygiene head session https://claude.ai/code/session_01QgnmpexRwud38wrs3XvBfV