JuliaDiff / JuliaDiff/ReverseDiff.jl
expression too large
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 393
- Forks
- 60
- Avg merge
- 18h 24m
- Merged PRs (30d)
- 8
Description
I think I'm hitting a limit to the number of variables I can have near 100,000, e.g.,
$ julia
_
_ _ _(_)_ | A fresh approach to technical computing
(_) | (_) (_) | Documentation: http://docs.julialang.org
_ _ _| |_ __ _ | Type "?help" for help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 0.5.0 (2016-09-19 18:14 UTC)
_/ |\__'_|_|_|\__'_| | Official http://julialang.org/ release
|__/ | x86_64-pc-linux-gnu
julia> using ReverseDiff: compile_gradient
julia> compile_gradient(x->norm(x), rand(10000))
(::#301) (generic function with 1 method)
julia> compile_gradient(x->norm(x), rand(100000))
ERROR: syntax: expression too large
in compile(::ReverseDiff.GradientTape{##7#8,ReverseDiff.TrackedArray{Float64,Float64,1,Array{Float64,1},Array{Float64,1}},ReverseDiff.TrackedReal{Float64,Float64,Void}}) at /home/marius/.julia/v0.5/ReverseDiff/src/api/tape.jl:83
in compile_gradient(::Function, ::Array{Float64,1}, ::Vararg{Array{Float64,1},N}) at /home/marius/.julia/v0.5/ReverseDiff/src/api/tape.jl:104
Is there any way to go beyond this or is it just impractical?
Actually, where I'd be interested if I can get to is about O(10,000,000)... is that just too crazy to even consider?
Contributor guide
No contributing guide indexed for this repository
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 compile_gradient and the compile path in src/api/tape.jl, especially the reported lines 83 and 104, and reproduce the failure with the 100,000-element example. Determine whether the expression-size limit can be addressed and define supported behavior for substantially larger inputs, including the requested million-scale case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100