EnzymeAD / EnzymeAD/Reactant.jl

Stackoverflow while precompiling

Open
#1,224 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
Julia
Stars
370
Forks
74
Avg merge
18h 47m
Merged PRs (30d)
30

Description

As the title suggests, I see a stack overflow while precompiling. Happens on `#main` and on 0.2.85 (the latest release at this time)

```julia
ERROR: LoadError: StackOverflowError: [260/1845]
Stacktrace:
[1] top-level scope
@ ~/.julia/packages/Reactant/3hh4e/src/TracedRArray.jl:230
[2] include(mod::Module, _path::String)
@ Base ./Base.jl:495
[3] include(x::String)
@ Reactant ~/.julia/packages/Reactant/3hh4e/src/Reactant.jl:1
[4] top-level scope
@ ~/.julia/packages/Reactant/3hh4e/src/Reactant.jl:151
[5] include
@ ./Base.jl:495 [inlined]
[6] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pai
r{Base.PkgId, UInt128}}, source::Nothing)
@ Base ./loading.jl:2222
[7] top-level scope
@ stdin:3
in expression starting at /home/dhairyalgandhi/.julia/packages/Reactant/3hh4e/src/TracedRArray.jl:1
in expression starting at /home/dhairyalgandhi/.julia/packages/Reactant/3hh4e/src/Reactant.jl:1
```

which points to a `getindex` method on `WrappedArray` [here](https://github.com/EnzymeAD/Reactant.jl/blob/9900463fd56a5e22ac4e5cb0cc2d3cff9c12cab2/src/TracedRArray.jl#L230).

Happens for both PJRT and IFRT fwiw. This is on an Ubuntu machine with

```julia
Julia Version 1.10.6
Commit 67dffc4a8ae (2024-10-28 12:23 UTC)
Build Info:
Official https://julialang.org/ release
Platform Info:
OS: Linux (x86_64-linux-gnu)
CPU: 64 × AMD EPYC 7513 32-Core Processor
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-15.0.7 (ORCJIT, znver3)
Threads: 1 default, 0 interactive, 1 GC (on 64 virtual cores)
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.