You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
julia> using Enzyme, GPUCompiler
julia> f1(x) = x*x
# Returns a tuple of active returns, which in this case is simply (2.0,)
f1 (generic function with 1 method)
julia> @test first(autodiff(Reverse, f1, Active(1.0))[1]) ≈ 2.0
ERROR: LoadError: UndefVarError: `@test` not defined
in expression starting at REPL[6]:1
julia> autodiff(Reverse, f1, Active(1.0))
((2.0,),)
julia> autodiff(Reverse, f1, Const(1.0))
((nothing,),)
julia> GPUCompiler.GLOBAL_CI_CACHES
Dict{CompilerConfig, GPUCompiler.CodeCache} with 5 entries:
CompilerConfig for EnzymeTarget => CodeCache(IdDict{MethodInstance, Vector{CodeInstance}}())
CompilerConfig for EnzymeTarget => CodeCache(IdDict{MethodInstance, Vector{CodeInstance}}())
CompilerConfig for EnzymeTarget => CodeCache(IdDict{MethodInstance, Vector{CodeInstance}}(MethodInstance for *(::Float64, ::Float64)=>[CodeInstance(MethodInstance for *(::Float64, ::Float64), #undef, 0x0000000000000001, 0xffffffffffffffff, Float64, #undef, "\x01\0\n\0\x03\0\0\0\0\b\b\x16\x88\xc2\xe6.\x1e\x…
CompilerConfig for NativeCompilerTarget => CodeCache(IdDict{MethodInstance, Vector{CodeInstance}}(MethodInstance for *(::Float64, ::Float64)=>[CodeInstance(MethodInstance for *(::Float64, ::Float64), #undef, 0x0000000000000001, 0xffffffffffffffff, Float64, #undef, "\x01\0\n\0\x03\0\0\0\0\b\b\x16\x88\xc2\xe6.\x1e\x…
CompilerConfig for EnzymeTarget => CodeCache(IdDict{MethodInstance, Vector{CodeInstance}}(MethodInstance for *(::Float64, ::Float64)=>[CodeInstance(MethodInstance for *(::Float64, ::Float64), #undef, 0x0000000000000001, 0xffffffffffffffff, Float64, #undef, "\x01\0\n\0\x03\0\0\0\0\b\b\x16\x88\xc2\xe6.\x1e\x…
julia>
So inference unnecessarily repeats work. We need to carefully define what we need to split the cache on. cc: @maleadt
I think we should probably define a AbstractCacheKey and construct that from the compiler params, requiring downstream users to make those conscious choices.
The text was updated successfully, but these errors were encountered:
GPUCompiler hashes CompilerConfig which contains the CompilerParams and uses that as a key for the global dictionary that splits the global inference cache in https://github.com/JuliaGPU/GPUCompiler.jl/blob/21ca075c1e91fe0c15f1330ab487b4831013ec1f/src/jlgen.jl#L175
Enzyme.jl/src/compiler.jl
Line 2529 in 9d6963c
So inference unnecessarily repeats work. We need to carefully define what we need to split the cache on. cc: @maleadt
Especially for JuliaGPU/GPUCompiler.jl#534 / JuliaLang/julia#52233
I think we should probably define a
AbstractCacheKey
and construct that from the compiler params, requiring downstream users to make those conscious choices.The text was updated successfully, but these errors were encountered: