Skip to content

Commit 1a4d174

Browse files
committed
Add gradient benchmark CI (#261)
1 parent 2f10876 commit 1a4d174

File tree

4 files changed

+76
-24
lines changed

4 files changed

+76
-24
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Run gradient benchmarks
2+
3+
on:
4+
pull_request:
5+
types: [labeled, opened, synchronize, reopened]
6+
7+
# Only trigger the benchmark job when you add `run benchmark` label to the PR
8+
jobs:
9+
Benchmark:
10+
runs-on: ubuntu-latest
11+
if: contains(github.event.pull_request.labels.*.name, 'run gradient benchmark')
12+
steps:
13+
- uses: actions/checkout@v2
14+
- uses: julia-actions/setup-julia@latest
15+
with:
16+
version: 1
17+
- uses: julia-actions/julia-buildpkg@latest
18+
- name: Install dependencies
19+
run: julia -e 'using Pkg; pkg"add PkgBenchmark [email protected]"'
20+
- name: Run benchmarks
21+
run: julia -e 'using BenchmarkCI; BenchmarkCI.judge(;script = joinpath(pwd(), "benchmark", "benchmarks_grad.jl"))'
22+
- name: Post results
23+
run: julia -e 'using BenchmarkCI; BenchmarkCI.postjudge()'
24+
env:
25+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26+
- name: Push results
27+
run: julia -e "using BenchmarkCI; BenchmarkCI.pushresult(;branch = "benchmark-gradients-results")"
28+
env:
29+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30+
SSH_KEY: ${{ secrets.DOCUMENTER_KEY }}

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@
22
*.jl.mem
33
docs/build
44
docs/site
5-
Manifest.toml
5+
Manifest.toml
6+
/.benchmarkci
7+
/benchmark/*.json

benchmark/Manifest.toml

Lines changed: 27 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
# This file is machine-generated - editing it directly is not advised
22

3-
julia_version = "1.9.1"
3+
julia_version = "1.10.2"
44
manifest_format = "2.0"
55
project_hash = "0cb0756144aac73ae8e2d06d9a0f6567a7a2f964"
66

77
[[deps.ADNLPModels]]
88
deps = ["ADTypes", "ForwardDiff", "LinearAlgebra", "NLPModels", "Requires", "ReverseDiff", "SparseArrays", "SparseConnectivityTracer", "SparseMatrixColorings"]
9-
git-tree-sha1 = "2b582670fb51216d8d000c6de72934d1f68c4e7c"
10-
repo-rev = "main"
11-
repo-url = "https://github.com/JuliaSmoothOptimizers/ADNLPModels.jl"
9+
path = ".."
1210
uuid = "54578032-b7ea-4c30-94aa-7cbd1cce6c9a"
1311
version = "0.8.2"
1412

@@ -251,7 +249,7 @@ weakdeps = ["Dates", "LinearAlgebra"]
251249
[[deps.CompilerSupportLibraries_jll]]
252250
deps = ["Artifacts", "Libdl"]
253251
uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae"
254-
version = "1.0.2+0"
252+
version = "1.1.0+0"
255253

256254
[[deps.CompositeTypes]]
257255
git-tree-sha1 = "bce26c3dab336582805503bed209faab1c279768"
@@ -844,21 +842,26 @@ version = "0.2.0"
844842
[[deps.LibCURL]]
845843
deps = ["LibCURL_jll", "MozillaCACerts_jll"]
846844
uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21"
847-
version = "0.6.3"
845+
version = "0.6.4"
848846

849847
[[deps.LibCURL_jll]]
850848
deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"]
851849
uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0"
852-
version = "7.84.0+0"
850+
version = "8.4.0+0"
853851

854852
[[deps.LibGit2]]
855-
deps = ["Base64", "NetworkOptions", "Printf", "SHA"]
853+
deps = ["Base64", "LibGit2_jll", "NetworkOptions", "Printf", "SHA"]
856854
uuid = "76f85450-5226-5b5a-8eaa-529ad045b433"
857855

856+
[[deps.LibGit2_jll]]
857+
deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll"]
858+
uuid = "e37daf67-58a4-590a-8e99-b0245dd2ffc5"
859+
version = "1.6.4+0"
860+
858861
[[deps.LibSSH2_jll]]
859862
deps = ["Artifacts", "Libdl", "MbedTLS_jll"]
860863
uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8"
861-
version = "1.10.2+0"
864+
version = "1.11.0+1"
862865

863866
[[deps.Libdl]]
864867
uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
@@ -987,7 +990,7 @@ version = "1.1.9"
987990
[[deps.MbedTLS_jll]]
988991
deps = ["Artifacts", "Libdl"]
989992
uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1"
990-
version = "2.28.2+0"
993+
version = "2.28.2+1"
991994

992995
[[deps.Measures]]
993996
git-tree-sha1 = "c13304c81eec1ed3af7fc20e75fb6b26092a1102"
@@ -1005,7 +1008,7 @@ uuid = "a63ad114-7e13-5084-954f-fe012c677804"
10051008

10061009
[[deps.MozillaCACerts_jll]]
10071010
uuid = "14a3606d-f60d-562e-9121-12d972cd8159"
1008-
version = "2022.10.11"
1011+
version = "2023.1.10"
10091012

10101013
[[deps.MultivariatePolynomials]]
10111014
deps = ["ChainRulesCore", "DataStructures", "LinearAlgebra", "MutableArithmetics"]
@@ -1056,12 +1059,12 @@ version = "1.3.5+1"
10561059
[[deps.OpenBLAS_jll]]
10571060
deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"]
10581061
uuid = "4536629a-c528-5b80-bd46-f80d51c5b363"
1059-
version = "0.3.21+4"
1062+
version = "0.3.23+4"
10601063

10611064
[[deps.OpenLibm_jll]]
10621065
deps = ["Artifacts", "Libdl"]
10631066
uuid = "05823500-19ac-5b8b-9628-191a04bc5112"
1064-
version = "0.8.1+0"
1067+
version = "0.8.1+2"
10651068

10661069
[[deps.OpenSSL]]
10671070
deps = ["BitFlags", "Dates", "MozillaCACerts_jll", "OpenSSL_jll", "Sockets"]
@@ -1101,7 +1104,7 @@ version = "1.6.3"
11011104
[[deps.PCRE2_jll]]
11021105
deps = ["Artifacts", "Libdl"]
11031106
uuid = "efcefdf7-47ab-520b-bdef-62a2eaa19f15"
1104-
version = "10.42.0+0"
1107+
version = "10.42.0+1"
11051108

11061109
[[deps.PDMats]]
11071110
deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse"]
@@ -1153,7 +1156,7 @@ version = "0.43.4+0"
11531156
[[deps.Pkg]]
11541157
deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"]
11551158
uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
1156-
version = "1.9.0"
1159+
version = "1.10.0"
11571160

11581161
[[deps.PkgBenchmark]]
11591162
deps = ["BenchmarkTools", "Dates", "InteractiveUtils", "JSON", "LibGit2", "Logging", "Pkg", "Printf", "TerminalLoggers", "UUIDs"]
@@ -1269,7 +1272,7 @@ deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"]
12691272
uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"
12701273

12711274
[[deps.Random]]
1272-
deps = ["SHA", "Serialization"]
1275+
deps = ["SHA"]
12731276
uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
12741277

12751278
[[deps.RandomExtensions]]
@@ -1437,6 +1440,7 @@ version = "1.2.1"
14371440
[[deps.SparseArrays]]
14381441
deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"]
14391442
uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
1443+
version = "1.10.0"
14401444

14411445
[[deps.SparseConnectivityTracer]]
14421446
deps = ["ADTypes", "Compat", "DocStringExtensions", "Random", "Requires", "SparseArrays"]
@@ -1499,7 +1503,7 @@ version = "1.4.3"
14991503
[[deps.Statistics]]
15001504
deps = ["LinearAlgebra", "SparseArrays"]
15011505
uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
1502-
version = "1.9.0"
1506+
version = "1.10.0"
15031507

15041508
[[deps.StatsAPI]]
15051509
deps = ["LinearAlgebra"]
@@ -1557,9 +1561,9 @@ deps = ["Libdl", "LinearAlgebra", "Serialization", "SparseArrays"]
15571561
uuid = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9"
15581562

15591563
[[deps.SuiteSparse_jll]]
1560-
deps = ["Artifacts", "Libdl", "Pkg", "libblastrampoline_jll"]
1564+
deps = ["Artifacts", "Libdl", "libblastrampoline_jll"]
15611565
uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c"
1562-
version = "5.10.1+6"
1566+
version = "7.2.1+1"
15631567

15641568
[[deps.SymbolicIndexingInterface]]
15651569
git-tree-sha1 = "be414bfd80c2c91197823890c66ef4b74f5bf5fe"
@@ -1917,7 +1921,7 @@ version = "1.5.0+0"
19171921
[[deps.Zlib_jll]]
19181922
deps = ["Libdl"]
19191923
uuid = "83775a58-1f1d-513f-b197-d71354ab007a"
1920-
version = "1.2.13+0"
1924+
version = "1.2.13+1"
19211925

19221926
[[deps.Zstd_jll]]
19231927
deps = ["Artifacts", "JLLWrappers", "Libdl"]
@@ -1980,7 +1984,7 @@ version = "0.15.1+0"
19801984
[[deps.libblastrampoline_jll]]
19811985
deps = ["Artifacts", "Libdl"]
19821986
uuid = "8e850b90-86db-534c-a0d3-1478176c7d93"
1983-
version = "5.8.0+0"
1987+
version = "5.8.0+1"
19841988

19851989
[[deps.libevdev_jll]]
19861990
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
@@ -2027,12 +2031,12 @@ version = "1.1.6+0"
20272031
[[deps.nghttp2_jll]]
20282032
deps = ["Artifacts", "Libdl"]
20292033
uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d"
2030-
version = "1.48.0+0"
2034+
version = "1.52.0+1"
20312035

20322036
[[deps.p7zip_jll]]
20332037
deps = ["Artifacts", "Libdl"]
20342038
uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0"
2035-
version = "17.4.0+0"
2039+
version = "17.4.0+2"
20362040

20372041
[[deps.x264_jll]]
20382042
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]

benchmark/benchmarks_grad.jl

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Include useful packages
2+
using ADNLPModels
3+
using Dates, DelimitedFiles, JLD2, LinearAlgebra, Printf, SparseArrays
4+
using BenchmarkTools, DataFrames
5+
#JSO packages
6+
using NLPModels, OptimizationProblems, SolverBenchmark
7+
# Most likely benchmark with JuMP as well
8+
using JuMP, NLPModelsJuMP
9+
10+
include("problems_sets.jl")
11+
verbose_subbenchmark = false
12+
13+
# Run locally with `tune!(SUITE)` and then `run(SUITE)`
14+
const SUITE = BenchmarkGroup()
15+
16+
include("gradient/benchmarks_gradient.jl")

0 commit comments

Comments
 (0)