Skip to content

Commit

Permalink
Merge pull request #50 from pywr/paper-benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
jetuk authored Sep 28, 2023
2 parents b9f4ee4 + 92f26fc commit 33efe4e
Show file tree
Hide file tree
Showing 41 changed files with 3,900 additions and 885 deletions.
21 changes: 14 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ float-cmp = "0.9.0"
hdf5 = { version="0.8.1" }
csv = "1.1"
clp-sys = { path = "./clp-sys" }
clipm = { path = "./clipm", optional = true }
ipm-ocl = { path = "./ipm-ocl", optional = true }
ipm-simd = { path = "./ipm-simd", optional = true }
wasmer = "4.0.0"
serde = { version = "1", features = ["derive"] }
serde_json = "1.0"
Expand All @@ -43,17 +44,20 @@ pyo3-polars = "0.7.0"
pywr-schema = { git = "https://github.com/pywr/pywr-schema/", tag="v0.7.0" }
rhai = { version="1.12.0", features=["sync"] }

# OpenCL
ocl = { version = "0.19", optional = true }

# Binary dependencies
clap = { version="4.0", features=["derive"] }
anyhow = "1.0.69"

rand = "0.8.5"
rand_distr = "0.4.3"
rand_chacha = "0.3.1"

[dev-dependencies]
tempfile = "3.3.0"
criterion = "0.5"
rand = "0.8.5"
rand_distr = "0.4.3"
rand_chacha = "0.3.1"

[lib]
name = "pywr"
Expand All @@ -65,7 +69,8 @@ crate-type = ["cdylib", "rlib"]
extension-module = ["pyo3/extension-module"]
default = ["extension-module"]
highs = ["dep:highs-sys"]
clipm = ["dep:clipm"]
ipm-ocl = ["dep:ipm-ocl", "dep:ocl"]
ipm-simd = ["dep:ipm-simd"]

[[bin]]
name = "pywr-cli"
Expand All @@ -74,7 +79,9 @@ path = "src/main.rs"

[workspace]
members = [
"clipm",
"ipm-common",
"ipm-ocl",
"ipm-simd",
"clp-sys",
]
exclude = [
Expand All @@ -83,7 +90,7 @@ exclude = [

[profile.release]
opt-level = 3 # fast and small wasm
lto = true
# lto = true
# strip = true
# Turn this on for profiling
# debug = true
Expand Down
15 changes: 15 additions & 0 deletions bench.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env bash

set -e

ODIR=benches/$1
FEATURES="ipm-ocl,ipm-simd"

mkdir -p "${ODIR}"

#cargo +nightly criterion --no-default-features --features ${FEATURES} --message-format=json -- random-models-size > "${ODIR}/random-models-size.json"
#cargo +nightly criterion --no-default-features --features ${FEATURES} --message-format=json -- random-models-scenarios > "${ODIR}/random-models-scenarios.json"
cargo +nightly criterion --no-default-features --features ${FEATURES} --message-format=json -- random-models-hyper-scenarios > "${ODIR}/random-models-hyper-scenarios.json"
#cargo +nightly criterion --no-default-features --features ${FEATURES} --message-format=json -- random-models-threads > "${ODIR}/random-models-threads.json"
#cargo +nightly criterion --no-default-features --features ${FEATURES} --message-format=json -- random-models-ipm-convergence > "${ODIR}/random-models-ipm-convergence.json"
# cargo +nightly criterion --no-default-features --features ipm-ocl --message-format=json random-models-ocl-chunks > "${ODIR}/random-models-ocl-chunks.json"
Loading

0 comments on commit 33efe4e

Please sign in to comment.