Skip to content

Commit

Permalink
perf: force sync
Browse files Browse the repository at this point in the history
  • Loading branch information
avik-pal committed Nov 2, 2024
1 parent 96e9ce8 commit c35441f
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions perf/resnet/lux_reactant.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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); block_until_ready=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
Expand Down

0 comments on commit c35441f

Please sign in to comment.