From 5a28fc07d6c6438d90b504a25045ce9b26e8e077 Mon Sep 17 00:00:00 2001 From: Avik Pal Date: Fri, 1 Nov 2024 21:45:49 -0400 Subject: [PATCH] perf: force sync --- perf/resnet/lux_reactant.jl | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/perf/resnet/lux_reactant.jl b/perf/resnet/lux_reactant.jl index 805bc5d5be..e8c6dd246d 100644 --- a/perf/resnet/lux_reactant.jl +++ b/perf/resnet/lux_reactant.jl @@ -43,12 +43,9 @@ function main() x = rand(Float32, 224, 224, 3, b) |> dev - model_compiled = @compile model(x, ps_ra, st_ra) + model_compiled = Reactant.compile(model, (x, ps_ra, st_ra); sync=true) - timings[b] = @belapsed begin - y, _ = $(model_compiled)($(x), $(ps_ra), $(st_ra)) - Reactant.synchronize(y) - end + timings[b] = @belapsed $(model_compiled)($(x), $(ps_ra), $(st_ra)) println("Best timing: $(timings[b]) s") end