@@ -5,11 +5,11 @@ function benchmark_graph_engine()
55 SUITE = BenchmarkGroup ([" graph_creation" ])
66
77 # Benchmark how long it takes to create a model structure
8- SUITE[" create_model" ] = @benchmarkable GraphPPL. Model (identity, GraphPPL. PluginsCollection (), GraphPPL. DefaultBackend ()) evals = 1
8+ SUITE[" create_model" ] = @benchmarkable GraphPPL. Model (identity, GraphPPL. PluginsCollection (), GraphPPL. DefaultBackend (), nothing ) evals = 1
99
1010 # Benchmark how long it takes to get the context of a model
1111 SUITE[" getcontext" ] = @benchmarkable GraphPPL. getcontext (model) evals = 1 setup = begin
12- model = GraphPPL. Model (identity, GraphPPL. PluginsCollection (), GraphPPL. DefaultBackend ())
12+ model = GraphPPL. Model (identity, GraphPPL. PluginsCollection (), GraphPPL. DefaultBackend (), nothing )
1313 end
1414
1515 # Benchmark how long it takes to create a factor node
@@ -29,7 +29,7 @@ function benchmark_factor_node_creation()
2929 for f in (sum,), n in Int .(exp10 .(0 : 4 ))
3030 SUITE[" make_node! (n inputs)" , f, n] = @benchmarkable GraphPPL. make_node! (model, ctx, $ f, y, (in = x,)) evals =
3131 1 setup = begin
32- model = GraphPPL. Model (identity, GraphPPL. PluginsCollection (), GraphPPL. DefaultBackend ())
32+ model = GraphPPL. Model (identity, GraphPPL. PluginsCollection (), GraphPPL. DefaultBackend (), nothing )
3333 ctx = GraphPPL. getcontext (model)
3434 y = GraphPPL. getorcreate! (model, ctx, :y , nothing )
3535 foreach (1 : ($ n)) do i
@@ -44,7 +44,7 @@ function benchmark_factor_node_creation()
4444 SUITE[" make_node! (n nodes)" , f, n] = @benchmarkable foreach (
4545 _ -> GraphPPL. make_node! (model, ctx, $ f, y, (in = x,)), 1 : ($ n)
4646 ) evals = 1 setup = begin
47- model = GraphPPL. Model (identity, GraphPPL. PluginsCollection (), GraphPPL. DefaultBackend ())
47+ model = GraphPPL. Model (identity, GraphPPL. PluginsCollection (), GraphPPL. DefaultBackend (), nothing )
4848 ctx = GraphPPL. getcontext (model)
4949 y = GraphPPL. getorcreate! (model, ctx, :y , nothing )
5050 x = GraphPPL. getorcreate! (model, ctx, :x , nothing )
@@ -60,7 +60,7 @@ function benchmark_variable_node_creation()
6060 # This SUITE benchmarks how long it takes to create a single variable node
6161 SUITE[" getorcreate! (individual)" ] = @benchmarkable GraphPPL. getorcreate! (model, ctx, :x , nothing ) evals = 1 setup =
6262 begin
63- model = GraphPPL. Model (identity, GraphPPL. PluginsCollection (), GraphPPL. DefaultBackend ())
63+ model = GraphPPL. Model (identity, GraphPPL. PluginsCollection (), GraphPPL. DefaultBackend (), nothing )
6464 ctx = GraphPPL. getcontext (model)
6565 end
6666
@@ -69,7 +69,7 @@ function benchmark_variable_node_creation()
6969 SUITE[" getorcreate! (n individual)" , n] = @benchmarkable foreach (
7070 _ -> GraphPPL. getorcreate! (model, ctx, :x , nothing ), 1 : ($ n)
7171 ) evals = 1 setup = begin
72- model = GraphPPL. Model (identity, GraphPPL. PluginsCollection (), GraphPPL. DefaultBackend ())
72+ model = GraphPPL. Model (identity, GraphPPL. PluginsCollection (), GraphPPL. DefaultBackend (), nothing )
7373 ctx = GraphPPL. getcontext (model)
7474 end
7575 end
@@ -79,7 +79,7 @@ function benchmark_variable_node_creation()
7979 SUITE[" getorcreate! (n vector)" , n] = @benchmarkable foreach (
8080 i -> GraphPPL. getorcreate! (model, ctx, :x , i), 1 : ($ n)
8181 ) evals = 1 setup = begin
82- model = GraphPPL. Model (identity, GraphPPL. PluginsCollection (), GraphPPL. DefaultBackend ())
82+ model = GraphPPL. Model (identity, GraphPPL. PluginsCollection (), GraphPPL. DefaultBackend (), nothing )
8383 ctx = GraphPPL. getcontext (model)
8484 end
8585 end
0 commit comments