Skip to content

Commit

Permalink
fix enzyme test
Browse files Browse the repository at this point in the history
  • Loading branch information
nmheim committed Jul 24, 2024
1 parent 905f5e1 commit 0a2bb96
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions test/test_enzyme.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ using DynamicExpressions
operators = OperatorEnum(; binary_operators=(+, -, *, /), unary_operators=(cos, sin))
# TODO: More operators will trigger a segfault in Enzyme

# These options are required for Enzyme to work:
const eval_options = (turbo=Val(false),)

x1, x2, x3 = (i -> Node(Float64; feature=i)).(1:3)

tree = Node(1, x1, Node(1, x2)) # == x1 + cos(x2)
Expand All @@ -16,7 +13,7 @@ X = randn(3, 100);
dX = zero(X)

function f(tree, X, operators, output)
output[] = sum(eval_tree_array(tree, X, operators; eval_options...)[1])
output[] = sum(eval_tree_array(tree, X, operators)[1])
return nothing
end

Expand Down

0 comments on commit 0a2bb96

Please sign in to comment.