Support 32-bit platforms and add a 32-bit CI lane via test_groups.toml#97
Merged
ChrisRackauckas merged 1 commit intoJul 12, 2026
Conversation
Merged
ChrisRackauckas-Claude
force-pushed
the
support-32bit-platforms
branch
from
July 12, 2026 10:34
dc3f772 to
16dcf84
Compare
… broken 32-bit CI job Follow-up to SciML#95. Two things: 1. Fix a correctness gap SciML#95 shipped. Unlike `findfirstequal`, `findfirstsortedequal` had ONLY the `(Int64, DenseVector{Int64})` method and no generic fallback. On 32-bit platforms native `Int` is `Int32`, so `findfirstsortedequal(::Int32, ::Vector{Int32})` throws MethodError — 8385 such errors in the suite, and a bare `Pkg.test()` / any `Int`-vector caller on 32-bit is broken. Add a generic `searchsortedfirst` + equality post-check fallback (mirroring `findfirstequal`), so it works for any sorted vector on any platform. Add a test covering the fallback on Int32/Int16/Float32. 2. Remove the `tests-32bit` job SciML#95 added to Tests.yml. Running 32-bit Julia on the 64-bit `ubuntu-latest` runner fails at `setup-julia` (the i686 binary can't exec without the 32-bit loader, which is not installed before Julia is invoked: `spawn .../x86/bin/julia ENOENT`), so that job is red regardless of this fix. A proper 32-bit CI lane needs runner/reusable-workflow changes and is deferred; Tests.yml goes back to a thin grouped-tests caller. Minor bump 3.0.3 -> 3.1.0 (new public behavior: `findfirstsortedequal` now accepts any sorted vector). Verified locally: full Core suite passes on 32-bit i686 Julia 1.11 (0 errors) and on x64 (171915 tests); GROUP=All passes. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EcQkauMQ4KSytnTpJpXUZu
ChrisRackauckas-Claude
force-pushed
the
support-32bit-platforms
branch
from
July 12, 2026 10:45
16dcf84 to
4a379b0
Compare
ChrisRackauckas
marked this pull request as ready for review
July 12, 2026 12:20
ChrisRackauckas
added a commit
that referenced
this pull request
Jul 12, 2026
* Add generic findfirstsortedequal fallback (fixes 32-bit) and drop the broken 32-bit CI job Follow-up to #95. Two things: 1. Fix a correctness gap #95 shipped. Unlike `findfirstequal`, `findfirstsortedequal` had ONLY the `(Int64, DenseVector{Int64})` method and no generic fallback. On 32-bit platforms native `Int` is `Int32`, so `findfirstsortedequal(::Int32, ::Vector{Int32})` throws MethodError — 8385 such errors in the suite, and a bare `Pkg.test()` / any `Int`-vector caller on 32-bit is broken. Add a generic `searchsortedfirst` + equality post-check fallback (mirroring `findfirstequal`), so it works for any sorted vector on any platform. Add a test covering the fallback on Int32/Int16/Float32. 2. Remove the `tests-32bit` job #95 added to Tests.yml. Running 32-bit Julia on the 64-bit `ubuntu-latest` runner fails at `setup-julia` (the i686 binary can't exec without the 32-bit loader, which is not installed before Julia is invoked: `spawn .../x86/bin/julia ENOENT`), so that job is red regardless of this fix. A proper 32-bit CI lane needs runner/reusable-workflow changes and is deferred; Tests.yml goes back to a thin grouped-tests caller. Minor bump 3.0.3 -> 3.1.0 (new public behavior: `findfirstsortedequal` now accepts any sorted vector). Verified locally: full Core suite passes on 32-bit i686 Julia 1.11 (0 errors) and on x64 (171915 tests); GROUP=All passes. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EcQkauMQ4KSytnTpJpXUZu * Add the 32-bit CI lane via test_groups.toml Declare a `Core 32-bit` matrix-only alias that dispatches the Core body (group = "Core") on a single x86 Julia cell, so the WORD_SIZE != 64 scalar fallbacks in src/simd_ir.jl are exercised in CI — replacing #95's hand-added `tests-32bit` job (removed in the parent commit) with a declarative lane. This uses the arch axis / group alias in SciML/.github v1 (v1.24.0) and the i386 runtime-lib install before setup-julia (v1.24.1), so the x86 leg can actually run on the 64-bit ubuntu runner. Require `SciMLTesting = "2.2"`: the alias section is skipped by folder discovery only in SciMLTesting >= 2.2 (SciMLTesting.jl#22), which GROUP=All (the Downgrade job) and a bare `Pkg.test()` need. FindFirstFunctions runs unchanged on SciMLTesting 2.x (verified: Core suite passes on 2.1.0). Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EcQkauMQ4KSytnTpJpXUZu --------- Co-authored-by: ChrisRackauckas-Claude <accounts@chrisrackauckas.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.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.
Supersedes #95. Same 32-bit source support, but the CI lane is declared through the matrix (
test/test_groups.toml) instead of a hand-addedtests.ymljob — and it fixes a real gap that made #95's own suite error on 32-bit.What changed
Source
src/simd_ir.jl— the LLVM-IR SIMD kernels are typed for 64-bit lengths/pointers, so guard them behind@static if Sys.WORD_SIZE == 64and add a portable scalar fallback_scalar_firstbacking every primitive on 32-bit. (From Support 32-bit platforms #95.)src/equality.jl— pass lengths asInt64explicitly (from Support 32-bit platforms #95), and add a genericfindfirstsortedequalfallback. Unlikefindfirstequal,findfirstsortedequalhad only the(Int64, DenseVector{Int64})method. On 32-bit, nativeIntisInt32, sofindfirstsortedequal(::Int32, ::Vector{Int32})threwMethodError— 8385 such errors in the suite (this is why Support 32-bit platforms #95 as-is does not actually pass on 32-bit). The new method is a genericsearchsortedfirst+ equality post-check, mirroringfindfirstequal's fallback, so it works for any sorted vector on any platform.CI (the point of this PR)
Instead of #95's hand-added
tests-32bitjob inTests.yml, add a"Core 32-bit"section totest/test_groups.toml:Tests.ymlstays a thin caller ofgrouped-tests.yml@v1. This relies on the newarchaxis andgroupalias added to the SciML/.github matrix generator in SciML/.github#113 — that PR must merge andv1be retagged before the lane activates in CI.Tests & version
_scalar_first-vs-findfirstparity test (from Support 32-bit platforms #95) and a new generic-findfirstsortedequalfallback test (Int32/Int16/Float32), so both paths are exercised on 64-bit CI too.3.0.3 → 3.1.0(new public behavior:findfirstsortedequalnow accepts any sorted vector).Local verification (actually run, not inferred)
juliaup add 1.11~x86),GROUP=Core Pkg.test(): passes, 0 errors with the fix. Without the generic fallback it errored 8385 times — confirmed and root-caused..jlfiles are Runic-clean.Dependency
Blocked on SciML/.github#113 (arch axis + group alias). Until
v1includes it, thearch/groupkeys are inert and the existing 64-bit matrix is unchanged (verified: no-archtest_groups.tomloutput is byte-identical to before).Please ignore until reviewed by @ChrisRackauckas.
🤖 Generated with Claude Code