-
Notifications
You must be signed in to change notification settings - Fork 9
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
Allocations and time on compile
are ever-increasing
#319
Comments
I can't reproduce allocations, even though compile time does seem to increase slowly. using Reactant, BenchmarkTools
x = ConcreteRArray(rand(1024))
for _ in 1:100
@btime Reactant.Ops.with_debug() do
@jit Reactant.Ops.abs(x)
end
end
|
Got similar result as @mofeing using @jumerckx code.
|
Allocations might be platform dependent? I'm using macOS aarch64 (M1 pro) |
Gaëtan and I are both on |
compile
are ever-increasingcompile
are ever-increasing
x/ref EnzymeAD/Enzyme.jl#2152 |
I'm using
|
cc @vchuravy |
can you check if this persists with the recently released Enzyme.jl 0.13.19? |
Seems to persist with 0.13.19
|
this is fixed locally with #326 and latest Enzyme. Note that this still indicates Enzyme.jl's interpreter rule stuff is being sad, but we can disable rules
|
time does climb a bit tho weirdly |
With the latest interpreter stuff, increasing times (not allocations) are still a thing.
|
yeah, but the scaling is much lower julia> for _ in 1:10
@btime @jit Ops.abs(x)
end
15.026 ms (10978 allocations: 535.72 KiB)
15.111 ms (10978 allocations: 535.72 KiB)
16.605 ms (10978 allocations: 535.72 KiB)
16.844 ms (10978 allocations: 535.72 KiB)
18.649 ms (10978 allocations: 535.72 KiB)
19.280 ms (10978 allocations: 535.72 KiB)
19.619 ms (10978 allocations: 535.72 KiB)
19.835 ms (10978 allocations: 535.72 KiB)
20.569 ms (10978 allocations: 535.72 KiB)
22.509 ms (10978 allocations: 535.72 KiB)
julia> for _ in 1:10
@btime Ops.with_debug() do
@jit Ops.abs(x)
end
end
25.965 ms (11814 allocations: 583.87 KiB)
26.740 ms (11814 allocations: 583.87 KiB)
27.133 ms (11814 allocations: 583.87 KiB)
27.839 ms (11814 allocations: 583.87 KiB)
28.385 ms (11814 allocations: 583.87 KiB)
29.134 ms (11814 allocations: 583.87 KiB)
29.415 ms (11814 allocations: 583.87 KiB)
30.080 ms (11814 allocations: 583.87 KiB)
30.586 ms (11814 allocations: 583.87 KiB)
31.217 ms (11814 allocations: 583.87 KiB) |
Recently I found this strange behavior
Why are allocations (and time, but this looks like a consequence) ever increasing on each call to
compile
? For sure we are not freeing the previously compiled functions who live in theThunk
s but that shouldn't affect?The text was updated successfully, but these errors were encountered: