Skip to content

TEST ONLY: verify SciML/PoissonRandom.jl#72 unblocks GPU tau-leaping#590

Closed
ChrisRackauckas-Claude wants to merge 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:test-poissonrandom-passthroughrng-fix
Closed

TEST ONLY: verify SciML/PoissonRandom.jl#72 unblocks GPU tau-leaping#590
ChrisRackauckas-Claude wants to merge 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:test-poissonrandom-passthroughrng-fix

Conversation

@ChrisRackauckas-Claude
Copy link
Copy Markdown
Contributor

This PR exists solely to run GPU CI against the proposed fix in SciML/PoissonRandom.jl#72 before that PR is released. Do not merge.

Background

Issue #588: GPU kernel compile fails with InvalidIRError: jl_f_throw_methoderror on Julia 1.12 / latest CUDACore.

Root cause is in PoissonRandom, not in JumpProcesses. GPUCompiler installs CUDACore's overrides into a Julia overlay method table via Base.Experimental.@consistent_overlay. Julia 1.12's OverlayMethodTable.findall returns overlay matches without consulting the base method table whenever the overlay fully covers the signature (Compiler/src/methodtable.jl:73–92). So @device_override Random.randexp(rng::AbstractRNG) shadows PoissonRandom's specific Random.randexp(rng::PassthroughRNG) on the device, and the override body runs with rng::PassthroughRNG. Its Random.rand(rng, UInt52Raw()) then reaches rng_native_52(::PassthroughRNG) which has no method — hence the static throw(MethodError) that GPUCompiler rejects.

SciML/PoissonRandom.jl#72 fixes this by adding the two forwarding methods PassthroughRNG needs to survive overlay shadowing:

Random.rng_native_52(::PassthroughRNG) = UInt64
Random.rand(rng::PassthroughRNG, ::Type{T}) where {T} = rand(T)

This PR

  • No code change to JumpProcesses.
  • Adds a [sources] override in Project.toml pinning PoissonRandom to the fix branch.
  • Purpose: prove on real GPU CI that the PoissonRandom fix unblocks test/gpu/regular_jumps.jl.

Plan after CI

  • If GPU Tests pass: merge Make PassthroughRNG dispatch survive overlay method-table shadowing PoissonRandom.jl#72, tag 0.4.8, close this PR without merging. JumpProcesses master will then pick up 0.4.8 automatically (existing compat is "0.4").
  • If GPU Tests fail: the failure narrows the remaining problem; iterate on PoissonRandom or follow up upstream (there is a known separate CUDA.jl bug — @noinline randexp_unlikely triggers julia.get_pgcstack on Julia 1.12 — that may surface once the MethodError is unblocked).

Notes

🤖 Generated with Claude Code

Temporary [sources] override so GPU CI on this branch picks up
SciML/PoissonRandom.jl#72 (PassthroughRNG dispatch survives overlay
method-table shadowing). Remove before merge — once that PR is released
as 0.4.8, the existing PoissonRandom = "0.4" compat already covers it
and no JumpProcesses change is needed.

See issue SciML#588 and PR SciML#589 (closed) for the full debugging chain.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.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.

3 participants