Skip to content

Commit

Permalink
Simplify benchmark runner and pipelines (#494)
Browse files Browse the repository at this point in the history
[only benchmarks]
  • Loading branch information
maleadt authored Dec 11, 2024
1 parent 634cec7 commit 6ecb909
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 24 deletions.
4 changes: 2 additions & 2 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,6 @@ steps:
if: |
!build.pull_request.repository.fork &&
(build.message =~ /\[only benchmarks\]/ ||
build.message !~ /\[only/ && !build.pull_request.draft &&
build.message !~ /\[skip benchmarks\]/)
build.message !~ /\[only/ && !build.pull_request.draft &&
build.message !~ /\[skip benchmarks\]/)
timeout_in_minutes: 30
8 changes: 7 additions & 1 deletion .github/workflows/Benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,13 @@ on:

jobs:
benchmark:
if: ${{ (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && (contains(github.event.head_commit.message, '[only benchmarks]') || !contains(github.event.head_commit.message, '[only') && !contains(github.event.head_commit.message, '[skip benchmarks]') && github.event.pull_request.draft == false) }}
if: |
(github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.full_name == github.repository) &&
(contains(github.event.head_commit.message, '[only benchmarks]') ||
!contains(github.event.head_commit.message, '[only') &&
!contains(github.event.head_commit.message, '[skip benchmarks]') &&
github.event.pull_request.draft == false)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
21 changes: 0 additions & 21 deletions perf/runbenchmarks.jl
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ latency_results = include("latency.jl")

SUITE = BenchmarkGroup()

# NOTE: don't use spaces in benchmark names (tobami/codespeed#256)

include("metal.jl")
include("kernel.jl")
include("array.jl")
Expand Down Expand Up @@ -58,24 +56,5 @@ integration_results["metaldevrt"] = include("metaldevrt.jl")
results["latency"] = latency_results
results["integration"] = integration_results

println(results)


## comparison

# write out the results
BenchmarkTools.save("benchmarkresults.json", median(results))

# compare against previous results
# TODO: store these results so that we can compare when benchmarking PRs
reference_path = joinpath(@__DIR__, "reference.json")
if ispath(reference_path)
reference = BenchmarkTools.load(reference_path)[1]
comparison = judge(minimum(results), minimum(reference))

println("Improvements:")
println(improvements(comparison))

println("Regressions:")
println(regressions(comparison))
end

0 comments on commit 6ecb909

Please sign in to comment.