Skip to content

Commit

Permalink
add enzyme and mooncake to benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
seabbs committed Dec 10, 2024
1 parent 8dc444f commit 7cb70d9
Show file tree
Hide file tree
Showing 7 changed files with 283 additions and 183 deletions.
442 changes: 260 additions & 182 deletions benchmark/Manifest.toml

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions benchmark/Project.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
[deps]
ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b"
BenchmarkCI = "20533458-34a3-403d-a444-e18f38190b5b"
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
DynamicPPL = "366bfd00-2699-11ea-058f-f148b4cae6d8"
Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9"
EpiAware = "b2eeebe4-5992-4301-9193-7ebc9f62c855"
Mooncake = "da2b9cff-9c12-43a0-ae48-6db2b0edb7d6"
PkgBenchmark = "32113eaa-f34f-5b0d-bd6c-c81e245fc73d"
Turing = "fce5fe82-541a-59a6-adf8-730c64b5f9a0"
TuringBenchmarking = "0db1332d-5c25-4deb-809f-459bc696f94f"
3 changes: 3 additions & 0 deletions benchmark/bench/EpiAwareUtils/EpiAwareUtils.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
module BenchEpiAwareUtils

using BenchmarkTools, EpiAware.EpiAwareUtils
using ADTypes, Mooncake, Enzyme

Enzyme.API.runtimeActivity!(true)

suite = BenchmarkGroup()

Expand Down
4 changes: 4 additions & 0 deletions benchmark/bench/EpiInfModels/EpiInfModels.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
module BenchEpiInfModels

using BenchmarkTools, TuringBenchmarking, EpiAware, Distributions
using ADTypes, Mooncake, Enzyme

Enzyme.API.runtimeActivity!(true)

suite = BenchmarkGroup()

include("../../make_epiaware_suite.jl")
Expand Down
4 changes: 4 additions & 0 deletions benchmark/bench/EpiLatentModels/EpiLatentModels.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
module BenchEpiLatentModels

using BenchmarkTools, TuringBenchmarking, EpiAware, DynamicPPL
using ADTypes, Mooncake, Enzyme

Enzyme.API.runtimeActivity!(true)

suite = BenchmarkGroup()

include("../../make_epiaware_suite.jl")
Expand Down
4 changes: 4 additions & 0 deletions benchmark/bench/EpiObsModels/EpiObsModels.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
module BenchEpiObsModels

using BenchmarkTools, TuringBenchmarking, EpiAware, DynamicPPL
using ADTypes, Mooncake, Enzyme

Enzyme.API.runtimeActivity!(true)

suite = BenchmarkGroup()

include("../../make_epiaware_suite.jl")
Expand Down
6 changes: 5 additions & 1 deletion benchmark/make_epiaware_suite.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
A custom wrapper for the `TuringBenchmarking.make_turing_suite` that adds EpiAware specific defaults.
"""
function make_epiaware_suite(model; check = true,
adbackends = [:forwarddiff, :reversediff, :reversediff_compiled])
adbackends = [
:forwarddiff, :reversediff, :reversediff_compiled,
ADTypes.AutoMooncake(config = nothing),
ADTypes.AutoEnzyme()
])
suite = prefix_warnings(
() -> TuringBenchmarking.make_turing_suite(
model; check = check, adbackends = adbackends),
Expand Down

0 comments on commit 7cb70d9

Please sign in to comment.