-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enzyme Mutability Error with reverse mode #2255
Comments
Could you try #1852 ? |
On the latest of that branch (16d5b65), getting ERROR: LoadError: UndefVarError: `isvectortype` not defined
Stacktrace:
[1] include(mod::Module, _path::String)
@ Base ./Base.jl:495
[2] include(x::String)
@ Enzyme.Compiler ~/projects/Enzyme.jl/src/compiler.jl:1
[3] top-level scope
@ ~/projects/Enzyme.jl/src/compiler.jl:318
[4] include(mod::Module, _path::String)
@ Base ./Base.jl:495
[5] include(x::String)
@ Enzyme ~/projects/Enzyme.jl/src/Enzyme.jl:1
[6] top-level scope
@ ~/projects/Enzyme.jl/src/Enzyme.jl:127
[7] include
@ ./Base.jl:495 [inlined]
[8] 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{Pair{Base.PkgId, UInt128}}, source::Nothing)
@ Base ./loading.jl:2222
[9] top-level scope
@ stdin:3
in expression starting at /Users/mhauru/projects/Enzyme.jl/src/typeutils/recursive_maps.jl:1
in expression starting at /Users/mhauru/projects/Enzyme.jl/src/compiler.jl:1
in expression starting at /Users/mhauru/projects/Enzyme.jl/src/Enzyme.jl:1
in expression starting at stdin:3
✗ Enzyme
0 dependencies successfully precompiled in 3 seconds. 18 already precompiled.
ERROR: The following 1 direct dependency failed to precompile:
Enzyme [7da242da-08ed-463a-9acd-ee780be4f1d9]
Failed to precompile Enzyme [7da242da-08ed-463a-9acd-ee780be4f1d9] to "/Users/mhauru/.julia/compiled/v1.10/Enzyme/jl_Dskjik".
ERROR: LoadError: UndefVarError: `isvectortype` not defined
Stacktrace:
[1] include(mod::Module, _path::String)
@ Base ./Base.jl:495
[2] include(x::String)
@ Enzyme.Compiler ~/projects/Enzyme.jl/src/compiler.jl:1
[3] top-level scope
@ ~/projects/Enzyme.jl/src/compiler.jl:318
[4] include(mod::Module, _path::String)
@ Base ./Base.jl:495
[5] include(x::String)
@ Enzyme ~/projects/Enzyme.jl/src/Enzyme.jl:1
[6] top-level scope
@ ~/projects/Enzyme.jl/src/Enzyme.jl:127
[7] include
@ ./Base.jl:495 [inlined]
[8] 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{Pair{Base.PkgId, UInt128}}, source::Nothing)
@ Base ./loading.jl:2222
[9] top-level scope
@ stdin:3
in expression starting at /Users/mhauru/projects/Enzyme.jl/src/typeutils/recursive_maps.jl:1
in expression starting at /Users/mhauru/projects/Enzyme.jl/src/compiler.jl:1
in expression starting at /Users/mhauru/projects/Enzyme.jl/src/Enzyme.jl:1
in expression starting at stdin:
Stacktrace:
[1] pkgerror(msg::String)
@ Pkg.Types ~/.julia/juliaup/julia-1.10.6+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Pkg/src/Types.jl:70
[2] precompile(ctx::Pkg.Types.Context, pkgs::Vector{…}; internal_call::Bool, strict::Bool, warn_loaded::Bool, already_instantiated::Bool, timing::Bool, _from_loading::Bool, kwargs::@Kwargs{…})
@ Pkg.API ~/.julia/juliaup/julia-1.10.6+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Pkg/src/API.jl:1700
[3] precompile(pkgs::Vector{Pkg.Types.PackageSpec}; io::Base.TTY, kwargs::@Kwargs{_from_loading::Bool})
@ Pkg.API ~/.julia/juliaup/julia-1.10.6+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Pkg/src/API.jl:159
[4] precompile
@ ~/.julia/juliaup/julia-1.10.6+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Pkg/src/API.jl:147 [inlined]
[5] #precompile#114
@ ~/.julia/juliaup/julia-1.10.6+0.aarch64.apple.darwin14/share/julia/stdlib/v1.10/Pkg/src/API.jl:146 [inlined]
[6] #invokelatest#2
@ ./essentials.jl:894 [inlined]
[7] invokelatest
@ ./essentials.jl:889 [inlined]
[8] _require(pkg::Base.PkgId, env::String)
@ Base ./loading.jl:1963
[9] __require_prelocked(uuidkey::Base.PkgId, env::String)
@ Base ./loading.jl:1812
[10] #invoke_in_world#3
@ ./essentials.jl:926 [inlined]
[11] invoke_in_world
@ ./essentials.jl:923 [inlined]
[12] _require_prelocked(uuidkey::Base.PkgId, env::String)
@ Base ./loading.jl:1803
[13] macro expansion
@ ./loading.jl:1790 [inlined]
[14] macro expansion
@ ./lock.jl:267 [inlined]
[15] __require(into::Module, mod::Symbol)
@ Base ./loading.jl:1753
[16] #invoke_in_world#3
@ ./essentials.jl:926 [inlined]
[17] invoke_in_world
@ ./essentials.jl:923 [inlined]
[18] require(into::Module, mod::Symbol)
@ Base ./loading.jl:1746
Some type information was truncated. Use `show(err)` to see complete types. |
You need to also pick up the modified
|
With that, getting the original |
Oh yeah, #1852 won't make a difference here as the error happens in |
The error here is that you're returning an int, which is not a differentiable float type expected by gradient. We definitely should fix the error message, but that's the core issue here |
MWE
Output:
On Enzyme v0.13.28. This is a descendant of #1812.
The text was updated successfully, but these errors were encountered: