SciML / SciML/NeuralOperators.jl
Julia 1.13 Core lane fails while precompiling Reactant
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 41
- Forks
- 15
- Avg merge
- 13h 14m
- Merged PRs (30d)
- 12
Description
Summary
The Julia 1.13 prerelease Core lane fails on unmodified main at 9abb5d25e2c569506674e77e1e452861280799fc before any NeuralOperators assertion runs. Reactant 0.2.220, selected from the ap/fix_complex_fd test source, cannot precompile because it expands the removed non-public macro Core.Compiler.@timeit.
The same failure is visible in Tests run 29218346230, job 86721177395.
Local reproduction
From a clean detached worktree at 9abb5d2, with a fresh depot:
GROUP=Core julia +1.13 --project=. -e 'using Pkg; Pkg.test()'
using Julia 1.13.0-rc1 produces:
ERROR: LoadError: UndefVarError: `@timeit` not defined in `Compiler`
...
Failed to precompile Reactant [3c362404-f566-11ee-1572-e11a4b42c853]
...
Fourier Neural Operator | Error 1 Total 1
The locally reproduced Core run errors with 0 passed / 0 failed / 1 errored, matching CI.
History and root cause
A source-history bisect of the failing test import path identifies beb6feaaf7028e5cd4605fdbc244df4efd36a22a (PR #60) as the first NeuralOperators commit that adds Reactant to the test environment and imports it from the functional suite. Its parent d42075c347cbaa842640575aa65cc3a9873908bb has no Reactant test dependency. This is a latent dependency incompatibility, not a recent NeuralOperators source regression.
The relevant external boundary is JuliaLang/julia@75c44d0, which replaces the internal compiler timing macro with @zone. The installed version boundary confirms it directly:
Julia 1.12.6: Core.Compiler.@timeit defined = true, @zone defined = false
Julia 1.13.0-rc1: Core.Compiler.@timeit defined = false, @zone defined = true
Reactant also needs Julia 1.13 adaptations for Core.Compiler.finish / finishopt! and the removed Base._shrink. These are all non-public Julia internals owned by Reactant's compiler integration.
Upstream status
- EnzymeAD/Reactant.jl#2817 tracks the Julia 1.13 precompile failure.
- EnzymeAD/Reactant.jl#2818 implements the
@zone,finishopt!, and_shrinkadaptations, but remains open.
I applied that three-part patch shape locally to the exact pinned Reactant revision eac1c7ca0da6fb67f476c6f88dfad6da3e3c664f. On Julia 1.13.0-rc1, Reactant 0.2.220 then loaded successfully and this functional compiler smoke test passed:
x = Reactant.to_rarray([1.0, 2.0])
y = @jit sum(x)
@assert isapprox(y, 3.0)
The result was ConcretePJRTNumber{Float64, 1}(3.0).
This fix belongs in Reactant. Implementing it here would require pinning an unpublished fork; disabling the NeuralOperators prerelease lane would only hide the incompatibility. Removing the stale source override alone does not solve it: Reactant v0.2.274 still calls Core.Compiler.@timeit.
Resolution path
Once the Reactant Julia 1.13 fix is merged and released, update the NeuralOperators test dependency/source to a release containing it and rerun GROUP=Core on Julia 1.13.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the GROUP=Core Julia 1.13 test command and the linked CI job to confirm the Reactant precompile failure. Check Reactant issue #2817 and PR #2818, then update the NeuralOperators test dependency or source after a compatible Reactant release is available. Done means the Core lane passes on Julia 1.13 and the functional compiler smoke test runs without the precompile error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- ci-cd, machine-learning, testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100