@@ -30,55 +30,32 @@ function test_all_combinations(; binary_operators, unary_operators, turbo, types
3030
3131 X = rand (T, 3 , 10 )
3232 operators = OperatorEnum (;
33- binary_operators= binops,
34- unary_operators= unaops,
35- define_helper_functions= false ,
36- enable_autodiff= true ,
33+ binary_operators= binops, unary_operators= unaops, define_helper_functions= false
3734 )
3835 x = Node (T; feature= 1 )
3936 c = Node (T; val= one (T))
4037
4138 # Trivial:
4239 for l in (x, c)
4340 @ignore_domain_error eval_tree_array (l, X, operators; turbo= use_turbo)
44- for variable in (true , false )
45- @ignore_domain_error eval_grad_tree_array (
46- l, X, operators; turbo= use_turbo, variable
47- )
48- end
4941 end
5042
5143 # Binary operators
5244 for i in eachindex (binops), l in (x, c), r in (x, c)
5345 tree = Node (i, l, r)
5446 tree = convert (Node{T}, tree)
5547 @ignore_domain_error eval_tree_array (tree, X, operators; turbo= use_turbo)
56- for variable in (true , false )
57- @ignore_domain_error eval_grad_tree_array (
58- l, X, operators; turbo= use_turbo, variable
59- )
60- end
6148 end
6249
6350 # Unary operators
6451 for j in eachindex (unaops), k in eachindex (unaops), l in (x, c)
6552 tree = Node (j, l)
6653 tree = convert (Node{T}, tree)
6754 @ignore_domain_error eval_tree_array (tree, X, operators; turbo= use_turbo)
68- for variable in (true , false )
69- @ignore_domain_error eval_grad_tree_array (
70- l, X, operators; turbo= use_turbo, variable
71- )
72- end
7355
7456 tree = Node (j, Node (k, l))
7557 tree = convert (Node{T}, tree)
7658 @ignore_domain_error eval_tree_array (tree, X, operators; turbo= use_turbo)
77- for variable in (true , false )
78- @ignore_domain_error eval_grad_tree_array (
79- l, X, operators; turbo= use_turbo, variable
80- )
81- end
8259 end
8360
8461 # Both operators
@@ -91,20 +68,10 @@ function test_all_combinations(; binary_operators, unary_operators, turbo, types
9168 tree = Node (i, Node (j1, l), Node (j2, r))
9269 tree = convert (Node{T}, tree)
9370 @ignore_domain_error eval_tree_array (tree, X, operators; turbo= use_turbo)
94- for variable in (true , false )
95- @ignore_domain_error eval_grad_tree_array (
96- l, X, operators; turbo= use_turbo, variable
97- )
98- end
9971
10072 tree = Node (j1, Node (i, l, r))
10173 tree = convert (Node{T}, tree)
10274 @ignore_domain_error eval_tree_array (tree, X, operators; turbo= use_turbo)
103- for variable in (true , false )
104- @ignore_domain_error eval_grad_tree_array (
105- l, X, operators; turbo= use_turbo, variable
106- )
107- end
10875 end
10976 end
11077 return nothing
0 commit comments