Skip to content

Fix GPU CI: qualify validate_pure_leaping_inputs in KernelAbstractions ext#587

Merged
ChrisRackauckas merged 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:fix-master-jp-ka-ext
May 10, 2026
Merged

Fix GPU CI: qualify validate_pure_leaping_inputs in KernelAbstractions ext#587
ChrisRackauckas merged 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:fix-master-jp-ka-ext

Conversation

@ChrisRackauckas-Claude
Copy link
Copy Markdown
Contributor

Summary

  • Master GPU CI is red with UndefVarError: validate_pure_leaping_inputs not defined in JumpProcessesKernelAbstractionsExt (last red run: SciML/JumpProcesses.jl actions run 25110242250).
  • validate_pure_leaping_inputs is defined in src/simple_regular_solve.jl but not exported from JumpProcesses. The extension was calling it bare, which is invalid since using JumpProcesses only brings exported names into scope.
  • Smallest possible fix: qualify the call with JumpProcesses.validate_pure_leaping_inputs(...). Matches the existing pattern in JumpProcessesOrdinaryDiffEqCoreExt.jl, which uses JumpProcesses.__jump_init.

Notes

  • Please ignore until reviewed by @ChrisRackauckas.
  • CPU Run Tests was already green; this only affects the GPU Tests workflow.
  • GPU CI cannot be reproduced locally; the fix is verified by reading the failure log and matching it against the known-unexported function.

Test plan

  • GPU Tests workflow passes on this PR.
  • CPU Run Tests still green (unchanged code path on CPU).

🤖 Generated with Claude Code

The function `validate_pure_leaping_inputs` is defined in
`src/simple_regular_solve.jl` but is not exported from JumpProcesses.
The KernelAbstractions extension was calling it bare, which only works
if it is imported or exported. Master GPU CI fails with
`UndefVarError: validate_pure_leaping_inputs not defined in
JumpProcessesKernelAbstractionsExt`. Qualifying the call with the
module path is the smallest fix and matches the existing pattern in
`JumpProcessesOrdinaryDiffEqCoreExt` (which uses
`JumpProcesses.__jump_init`).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
@ChrisRackauckas-Claude
Copy link
Copy Markdown
Contributor Author

Update on GPU CI status

Initial CI run completed. Result: Run Tests and CPU jobs are green (or in-progress, expected to be green); GPU Tests is red but with a different, pre-existing failure than the one this PR set out to fix.

What this PR fixed

Verified working — the test now reaches kernel compilation, which means JumpProcesses.validate_pure_leaping_inputs(...) resolves correctly. The original UndefVarError is gone.

Newly-surfaced issue (separate from this PR's scope)

Run 25629456752 shows:

LoadError: InvalidIRError: compiling MethodInstance for
  JumpProcessesKernelAbstractionsExt.gpu_simple_tau_leaping_kernel(...)
  resulted in invalid LLVM IR
Reason: unsupported call to an unknown function (call to jl_f_throw_methoderror)
Stacktrace:
 [1] rand          @ Random/src/generation.jl:114    # Julia 1.12.6
 [2] rand          @ Random/src/Random.jl:255
 [3] randexp       @ CUDACore/src/device/random.jl:339   (device_override)
 [4] count_rand    @ PoissonRandom/MLLFD/src/PoissonRandom.jl:18
 [5] pois_rand     @ PoissonRandom/MLLFD/src/PoissonRandom.jl:137
 [6] kernel body   @ ext/JumpProcessesKernelAbstractionsExt.jl:135
 ...

Line 135 of the kernel is counts[k] = pois_rand(PoissonRandom.PassthroughRNG(), rate_cache[k]).

Dispatch chain on the GPU (Julia 1.12.6, CUDACore gtlJx, PoissonRandom MLLFD):

  • randexp(::PassthroughRNG) → bare randexp() (defined in PoissonRandom)
  • randexp()randexp(default_rng())randexp(::Philox2x32) (CUDACore overrides default_rng on device)
  • randexp(::AbstractRNG) device override at CUDACore/src/device/random.jl:339 calls Random.rand(rng, Random.UInt52Raw())
  • rand(rng, X) at Random.jl:255Sampler(rng, X, Val(1)) then rand(rng, sampler)
  • rand(r::AbstractRNG, ::SamplerTrivial{UInt52Raw{UInt64}}) at generation.jl:114_rand52(r, rng_native_52(r))
  • Somewhere on this path, Julia 1.12 has introduced a method-error path that GPUCompiler can't prove unreachable.

This is a compatibility bug between PoissonRandom's PassthroughRNG, Julia 1.12's Random stdlib, and CUDACore's device random overrides — not introduced by this PR. It would have blocked master GPU CI just the same once the validate_pure_leaping_inputs issue was past, since the failure is in kernel codegen.

Per the small-PR philosophy in CLAUDE.md, I'm keeping this PR focused on the original UndefVarError fix and tracking the new IR issue separately. The PR successfully makes incremental progress and is independently reviewable/mergeable.

🤖 Generated with Claude Code

@ChrisRackauckas ChrisRackauckas marked this pull request as ready for review May 10, 2026 21:25
@ChrisRackauckas ChrisRackauckas merged commit 28088bb into SciML:master May 10, 2026
11 of 12 checks passed
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