Skip to content

Commit

Permalink
Output size is kwarg in benchmarks (#105)
Browse files Browse the repository at this point in the history
  • Loading branch information
gdalle authored Aug 10, 2023
1 parent 9770882 commit afa23fd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions benchmark/benchmarks.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ using Zygote: Zygote

using ImplicitDifferentiation

forward(x, output_size) = fill(sqrt(sum(x)), output_size...)
conditions(x, y, output_size) = abs2.(y) .- sum(x)
forward(x; output_size) = fill(sqrt(sum(x)), output_size...)
conditions(x, y; output_size) = abs2.(y) .- sum(x)

function get_linear_solver(linear_solver_symbol::Symbol)
if linear_solver_symbol == :direct
Expand Down Expand Up @@ -49,8 +49,8 @@ function create_benchmarkable(;

x = rand(input_size...)
implicit = ImplicitFunction(
x -> forward(x, output_size),
(x, y) -> conditions(x, y, output_size);
x -> forward(x; output_size),
(x, y) -> conditions(x, y; output_size);
linear_solver,
conditions_backend,
)
Expand Down

0 comments on commit afa23fd

Please sign in to comment.