Skip to content
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

LoadError: UndefVarError: EnzymeRules not defined in julia 1.67 #1962

Closed
Dionysus7777777 opened this issue Oct 14, 2024 · 2 comments
Closed

Comments

@Dionysus7777777
Copy link

I am using the Enzyme package on Julia 1.67. I have successfully installed it, but there seem to be some strange issues. I have reinstalled Enzyme multiple times, but the problem remains unresolved.
┌ Warning: Error requiring EnzymeCore from KernelAbstractions
│ exception =
│ LoadError: UndefVarError: EnzymeRules not defined
│ Stacktrace:
│ [1] top-level scope
│ @ C:\Users\lenovo.julia\packages\KernelAbstractions\zPAn3\ext\EnzymeExt.jl:7
│ [2] include(mod::Module, _path::String)
│ @ Base .\Base.jl:384
│ [3] include(x::String)
│ @ KernelAbstractions C:\Users\lenovo.julia\packages\KernelAbstractions\zPAn3\src\KernelAbstractions.jl:1
│ [4] top-level scope
│ @ C:\Users\lenovo.julia\packages\Requires\Z8rfN\src\Requires.jl:40
│ [5] eval
│ @ .\boot.jl:360 [inlined]
│ [6] eval
│ @ C:\Users\lenovo.julia\packages\KernelAbstractions\zPAn3\src\KernelAbstractions.jl:1 [inlined]
│ [7] (::KernelAbstractions.var"#24#27")()
│ @ KernelAbstractions C:\Users\lenovo.julia\packages\Requires\Z8rfN\src\require.jl:101
│ [8] macro expansion
│ @ timing.jl:287 [inlined]
│ [9] err(f::Any, listener::Module, modname::String, file::String, line::Any)
│ @ Requires C:\Users\lenovo.julia\packages\Requires\Z8rfN\src\require.jl:47
│ [10] (::KernelAbstractions.var"#23#26")()
│ @ KernelAbstractions C:\Users\lenovo.julia\packages\Requires\Z8rfN\src\require.jl:100
│ [11] withpath(f::Any, path::String)
│ @ Requires C:\Users\lenovo.julia\packages\Requires\Z8rfN\src\require.jl:37
│ [12] (::KernelAbstractions.var"#22#25")()
│ @ KernelAbstractions C:\Users\lenovo.julia\packages\Requires\Z8rfN\src\require.jl:99
│ [13] #invokelatest#2
│ @ .\essentials.jl:708 [inlined]
│ [14] invokelatest
│ @ .\essentials.jl:706 [inlined]
│ [15] foreach(f::typeof(Base.invokelatest), itr::Vector{Function})
│ @ Base .\abstractarray.jl:2141
│ [16] loadpkg(pkg::Base.PkgId)
│ @ Requires C:\Users\lenovo.julia\packages\Requires\Z8rfN\src\require.jl:27
│ [17] #invokelatest#2
│ @ .\essentials.jl:708 [inlined]
│ [18] invokelatest
│ @ .\essentials.jl:706 [inlined]
│ [19] _tryrequire_from_serialized(modkey::Base.PkgId, build_id::UInt64, modpath::String)
│ @ Base .\loading.jl:715
│ [20] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String)
│ @ Base .\loading.jl:771
│ [21] _tryrequire_from_serialized(modkey::Base.PkgId, build_id::UInt64, modpath::String)
│ @ Base .\loading.jl:711
│ [22] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String)
│ @ Base .\loading.jl:771
│ [23] _require(pkg::Base.PkgId)
│ @ Base .\loading.jl:1020
│ [24] require(uuidkey::Base.PkgId)
│ @ Base .\loading.jl:936
│ [25] require(into::Module, mod::Symbol)
│ @ Base .\loading.jl:923
│ [26] include(fname::String)
│ @ Base.MainInclude .\client.jl:444
│ [27] top-level scope
│ @ c:\Users\lenovo\Desktop\Biomass.jl-main\src\crnn_cellulose.jl:1
│ [28] eval
│ @ .\boot.jl:360 [inlined]
│ [29] include_string(mapexpr::typeof(identity), mod::Module, code::String, filename::String)
│ @ Base .\loading.jl:1116
│ [30] include_string(m::Module, txt::String, fname::String)
│ @ Base .\loading.jl:1126
│ [31] invokelatest(::Any, ::Any, ::Vararg{Any, N} where N; kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
│ @ Base .\essentials.jl:708
│ [32] invokelatest(::Any, ::Any, ::Vararg{Any, N} where N)
│ @ Base .\essentials.jl:706
│ [33] inlineeval(m::Module, code::String, code_line::Int64, code_column::Int64, file::String; softscope::Bool)
│ @ VSCodeServer c:\Users\lenovo.vscode\extensions\julialang.language-julia-1.124.2\scripts\packages\VSCodeServer\src\eval.jl:271
│ [34] (::VSCodeServer.var"#67#72"{Bool, Bool, Bool, Module, String, Int64, Int64, String, VSCodeServer.ReplRunCodeRequestParams})()
│ @ VSCodeServer c:\Users\lenovo.vscode\extensions\julialang.language-julia-1.124.2\scripts\packages\VSCodeServer\src\eval.jl:181
│ [35] withpath(f::VSCodeServer.var"#67#72"{Bool, Bool, Bool, Module, String, Int64, Int64, String, VSCodeServer.ReplRunCodeRequestParams}, path::String)
│ @ VSCodeServer c:\Users\lenovo.vscode\extensions\julialang.language-julia-1.124.2\scripts\packages\VSCodeServer\src\repl.jl:276
│ [36] (::VSCodeServer.var"#66#71"{Bool, Bool, Bool, Module, String, Int64, Int64, String, VSCodeServer.ReplRunCodeRequestParams})()
│ @ VSCodeServer c:\Users\lenovo.vscode\extensions\julialang.language-julia-1.124.2\scripts\packages\VSCodeServer\src\eval.jl:179
│ [37] hideprompt(f::VSCodeServer.var"#66#71"{Bool, Bool, Bool, Module, String, Int64, Int64, String, VSCodeServer.ReplRunCodeRequestParams})
│ @ VSCodeServer c:\Users\lenovo.vscode\extensions\julialang.language-julia-1.124.2\scripts\packages\VSCodeServer\src\repl.jl:38
│ [38] (::VSCodeServer.var"#65#70"{Bool, Bool, Bool, Module, String, Int64, Int64, String, VSCodeServer.ReplRunCodeRequestParams})()
│ @ VSCodeServer c:\Users\lenovo.vscode\extensions\julialang.language-julia-1.124.2\scripts\packages\VSCodeServer\src\eval.jl:150
│ [39] with_logstate(f::Function, logstate::Any)
│ @ Base.CoreLogging .\logging.jl:491
│ [40] with_logger
│ @ .\logging.jl:603 [inlined]
│ [41] (::VSCodeServer.var"#64#69"{VSCodeServer.ReplRunCodeRequestParams})()
│ @ VSCodeServer c:\Users\lenovo.vscode\extensions\julialang.language-julia-1.124.2\scripts\packages\VSCodeServer\src\eval.jl:263
│ [42] #invokelatest#2
│ @ .\essentials.jl:708 [inlined]
│ [43] invokelatest(::Any)
│ @ Base .\essentials.jl:706
│ [44] macro expansion
│ @ c:\Users\lenovo.vscode\extensions\julialang.language-julia-1.124.2\scripts\packages\VSCodeServer\src\eval.jl:34 [inlined]
│ [45] (::VSCodeServer.var"#62#63")()
│ @ VSCodeServer .\task.jl:417
│ in expression starting at C:\Users\lenovo.julia\packages\KernelAbstractions\zPAn3\ext\EnzymeExt.jl:1

@wsmoses
Copy link
Member

wsmoses commented Oct 14, 2024

I think you need to open this on KernelAbstractions.jl (as the code causing errs is not in this repo). That said, latest Enzyme doesn't support Julia 1.6, you should use 1.10.

@Dionysus7777777
Copy link
Author

thank you very much

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

No branches or pull requests

2 participants