Closed MilesCranmer closed 5 months ago
Totals | |
---|---|
Change from base Build 7515102605: | -0.06% |
Covered Lines: | 1368 |
Relevant Lines: | 1452 |
master | ecb3574c93d373... | t[master]/t[ecb3574c93d373...] | |
---|---|---|---|
eval/ComplexF32/evaluation | 7.39 ± 0.49 ms | 7.26 ± 0.47 ms | 1.02 |
eval/ComplexF64/evaluation | 9.55 ± 0.72 ms | 9.49 ± 0.7 ms | 1.01 |
eval/Float32/derivative | 10.8 ± 1.5 ms | 10.8 ± 1.5 ms | 0.998 |
eval/Float32/derivative_turbo | 12.1 ± 1.5 ms | 10.7 ± 1.4 ms | 1.13 |
eval/Float32/evaluation | 2.67 ± 0.22 ms | 2.6 ± 0.22 ms | 1.03 |
eval/Float32/evaluation_turbo | 0.619 ± 0.029 ms | 0.551 ± 0.027 ms | 1.12 |
eval/Float64/derivative | 13.9 ± 0.71 ms | 13.7 ± 0.53 ms | 1.01 |
eval/Float64/derivative_turbo | 14.4 ± 0.61 ms | 13.8 ± 0.6 ms | 1.04 |
eval/Float64/evaluation | 2.85 ± 0.24 ms | 2.74 ± 0.24 ms | 1.04 |
eval/Float64/evaluation_turbo | 1.12 ± 0.061 ms | 1.03 ± 0.058 ms | 1.09 |
utils/combine_operators/break_sharing | 0.0398 ± 0.0024 ms | 0.0505 ± 0.0029 ms | 0.789 |
utils/convert/break_sharing | 28.1 ± 0.62 μs | 27.8 ± 1 μs | 1.01 |
utils/convert/preserve_sharing | 0.127 ± 0.0029 ms | 0.13 ± 0.0027 ms | 0.977 |
utils/copy/break_sharing | 28.7 ± 0.66 μs | 28.5 ± 1 μs | 1.01 |
utils/copy/preserve_sharing | 0.128 ± 0.0029 ms | 0.131 ± 0.0026 ms | 0.98 |
utils/count_constants/break_sharing | 10.3 ± 0.16 μs | 10.6 ± 0.16 μs | 0.972 |
utils/count_constants/preserve_sharing | 0.114 ± 0.0026 ms | 0.111 ± 0.0025 ms | 1.02 |
utils/count_depth/break_sharing | 17 ± 0.41 μs | 17.3 ± 0.38 μs | 0.984 |
utils/count_nodes/break_sharing | 9.83 ± 0.17 μs | 10.2 ± 0.15 μs | 0.967 |
utils/count_nodes/preserve_sharing | 0.116 ± 0.0026 ms | 0.115 ± 0.0027 ms | 1.02 |
utils/get_set_constants!/break_sharing | 0.0535 ± 0.00081 ms | 0.0532 ± 0.00073 ms | 1.01 |
utils/get_set_constants!/preserve_sharing | 0.327 ± 0.0067 ms | 0.322 ± 0.0063 ms | 1.02 |
utils/has_constants/break_sharing | 4.61 ± 0.21 μs | 4.34 ± 0.22 μs | 1.06 |
utils/has_operators/break_sharing | 2.09 ± 0.018 μs | 1.77 ± 0.03 μs | 1.18 |
utils/hash/break_sharing | 30.5 ± 0.48 μs | 30 ± 0.45 μs | 1.02 |
utils/hash/preserve_sharing | 0.132 ± 0.0028 ms | 0.132 ± 0.0025 ms | 1 |
utils/index_constants/break_sharing | 27.5 ± 0.67 μs | 27.7 ± 0.77 μs | 0.994 |
utils/index_constants/preserve_sharing | 0.129 ± 0.0028 ms | 0.127 ± 0.0026 ms | 1.01 |
utils/is_constant/break_sharing | 4.62 ± 0.23 μs | 4.77 ± 0.21 μs | 0.969 |
utils/simplify_tree/break_sharing | 0.259 ± 0.021 ms | 0.174 ± 0.016 ms | 1.49 |
utils/simplify_tree/preserve_sharing | 0.376 ± 0.022 ms | 0.296 ± 0.017 ms | 1.27 |
utils/string_tree/break_sharing | 0.564 ± 0.015 ms | 0.501 ± 0.014 ms | 1.13 |
utils/string_tree/preserve_sharing | 0.695 ± 0.02 ms | 0.639 ± 0.017 ms | 1.09 |
time_to_load | 0.686 ± 0.0026 s | 0.66 ± 0.0064 s | 1.04 |
Removing from v0.14 milesone as there's some remaining issues with compilation times.
@MilesCranmer FYI the fix for that issue is released in Enzyme 0.11.12 if you want to try rerunning this with that.
Thanks! Trying now.
Awesome. Seems to work now! What was the thing that fixed it?
Edit: it looks like there are issues on all systems for Julia 1.6 maybe, as well as Windows? https://github.com/SymbolicML/DynamicExpressions.jl/actions/runs/7394870782/job/20116976319?pr=52#step:6:382 https://github.com/SymbolicML/DynamicExpressions.jl/actions/runs/7394870782/job/20116975868#step:6:413 – I can report these if you want
Not sure, since when you tried main it was already fixed. I just released a new version.
On Wed, Jan 3, 2024 at 3:15 AM Miles Cranmer @.***> wrote:
Awesome. Seems to work now! What was the thing that fixed it?
— Reply to this email directly, view it on GitHub https://github.com/SymbolicML/DynamicExpressions.jl/pull/52#issuecomment-1874988500, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJTUXATTWERV4DYJY3HPZ3YMUHRNAVCNFSM6AAAAAA3PDTW6SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZUHE4DQNJQGA . You are receiving this because you commented.Message ID: @.***>
Yeah go ahead and open issues for anything else that arose. My comment only referred to the correctness issue you raised earlier.
Thanks! No worries. Just for simplicity I'll keep the integration tests on Julia 1.10 and ubuntu-latest, just to get this implemented finally.
Do you want me to add an integration test to Enzyme itself once this all passes and gets released?
This implements several changes to get Enzyme compatibility working (in support of in https://github.com/MilesCranmer/SymbolicRegression.jl/pull/254)
OperatorEnum
based on tuples of functions rather than vectors. Thus, it once again is specialized to the operators, rather than a generic struct.(a, b) = (1, 2, 3)
is valid Julia code?)Val(false)
to be passed forturbo
in the evaluation codes (rather than justfalse
), so that the compiler can completely remove the LoopVectorization branches inside an Enzyme gradient call.There are a few other unrelated changes which made sense to implement simultaneously:
enable_autodiff
. Instead, we just use Zygote within each gradient kernel – it should compile in the differential operator anyways, so no need to store them (especially because we store operators in a tuple now).eval_grad_tree_array
.turbo
foreval_grad_tree_array
, as it does not seem to improve performance through Zygote anyways.TODO:
differentiable_eval_tree_array
@nif
hits any issues. Potentially we could switch back to indexing if necessary.@nif
slows compilation quite a bit.