From 4a020327b3869c808c3f8643560e5a8d914dc27f Mon Sep 17 00:00:00 2001 From: Avik Pal Date: Sat, 2 Nov 2024 09:28:52 -0400 Subject: [PATCH] perf: add optimize option to reactant runs --- perf/resnet/lux_reactant.jl | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/perf/resnet/lux_reactant.jl b/perf/resnet/lux_reactant.jl index e8c6dd246..864c0585b 100644 --- a/perf/resnet/lux_reactant.jl +++ b/perf/resnet/lux_reactant.jl @@ -18,6 +18,11 @@ function parse_commandline() help = "Model size" arg_type = Int default = 50 + + "--optimize" + help = "Optimization Level for Reactant" + arg_type = String + default = "all" end #! format: on @@ -43,7 +48,9 @@ function main() x = rand(Float32, 224, 224, 3, b) |> dev - model_compiled = Reactant.compile(model, (x, ps_ra, st_ra); sync=true) + model_compiled = Reactant.compile( + model, (x, ps_ra, st_ra); sync=true, optimize=Symbol(parsed_args["optimize"]) + ) timings[b] = @belapsed $(model_compiled)($(x), $(ps_ra), $(st_ra))