From 325c46601c8a1c6289bbe9fa978695078e4732b4 Mon Sep 17 00:00:00 2001 From: Dale Black Date: Thu, 26 Dec 2024 12:48:48 -0800 Subject: [PATCH] check buildkite benchmarks --- .buildkite/runbenchmarks.yml | 2 +- .buildkite/runtests.yml | 119 -------------------------------- .github/workflows/Benchmark.yml | 20 +++--- benchmarks/aggregate.jl | 2 +- benchmarks/runbenchmarks.jl | 2 +- benchmarks/setup.jl | 9 ++- 6 files changed, 21 insertions(+), 133 deletions(-) delete mode 100644 .buildkite/runtests.yml diff --git a/.buildkite/runbenchmarks.yml b/.buildkite/runbenchmarks.yml index c1fd577..2ae1950 100644 --- a/.buildkite/runbenchmarks.yml +++ b/.buildkite/runbenchmarks.yml @@ -137,4 +137,4 @@ steps: - "benchmarks/results/combinedbenchmarks.json" agents: queue: "benchmark" - timeout_in_minutes: 15 + timeout_in_minutes: 15 \ No newline at end of file diff --git a/.buildkite/runtests.yml b/.buildkite/runtests.yml deleted file mode 100644 index d7ff26a..0000000 --- a/.buildkite/runtests.yml +++ /dev/null @@ -1,119 +0,0 @@ -steps: - - label: "CPU: Julia v{{matrix.version}}" - matrix: - setup: - version: - - "1.10" - plugins: - - JuliaCI/julia#v1: - version: "{{matrix.version}}" - - JuliaCI/julia-coverage#v1: - codecov: true - command: | - julia -e 'println("--- :julia: Instantiating project") - using Pkg - Pkg.develop(; path=pwd())' || exit 3 - - julia -e 'println("--- :julia: Running tests") - using Pkg - Pkg.test("DistanceTransforms"; coverage=true, julia_args=`--threads=auto`)' - agents: - queue: "juliagpu" - timeout_in_minutes: 5 - - - label: "CUDA: Julia {{matrix.version}}" - matrix: - setup: - version: - - "1.10" - plugins: - - JuliaCI/julia#v1: - version: "{{matrix.version}}" - - JuliaCI/julia-coverage#v1: - codecov: true - command: | - julia -e 'println("--- :julia: Instantiating project") - using Pkg - Pkg.develop(; path=pwd()) - Pkg.add("CUDA")' || exit 3 - - julia -e 'println("--- :julia: Running tests") - using Pkg - Pkg.test("DistanceTransforms"; coverage=true, test_args=["CUDA"])' - agents: - queue: "juliagpu" - cuda: "*" - timeout_in_minutes: 5 - - - label: "Metal: Julia {{matrix.version}}" - matrix: - setup: - version: - - "1.10" - plugins: - - JuliaCI/julia#v1: - version: "{{matrix.version}}" - - JuliaCI/julia-coverage#v1: - codecov: true - command: | - julia -e 'println("--- :julia: Instantiating project") - using Pkg - Pkg.develop(; path=pwd()) - Pkg.add("Metal")' || exit 3 - - julia -e 'println("+++ :julia: Running tests") - using Pkg - Pkg.test("DistanceTransforms"; coverage=true, test_args=["Metal"])' - agents: - queue: "juliaecosystem" - os: "macos" - arch: "aarch64" - timeout_in_minutes: 5 - - - label: "oneAPI: Julia {{matrix.version}}" - matrix: - setup: - version: - - "1.10" - plugins: - - JuliaCI/julia#v1: - version: "{{matrix.version}}" - - JuliaCI/julia-coverage#v1: - codecov: true - command: | - julia -e 'println("--- :julia: Instantiating project") - using Pkg - Pkg.develop(; path=pwd()) - Pkg.add("oneAPI")' || exit 3 - - julia -e 'println("+++ :julia: Running tests") - using Pkg - Pkg.test("DistanceTransforms"; coverage=true, test_args=["oneAPI"])' - agents: - queue: "juliagpu" - intel: "*" - timeout_in_minutes: 5 - - - label: "AMDGPU: Julia {{matrix.version}}" - matrix: - setup: - version: - - "1.10" - plugins: - - JuliaCI/julia#v1: - version: "{{matrix.version}}" - - JuliaCI/julia-coverage#v1: - codecov: true - command: | - julia -e 'println("--- :julia: Instantiating project") - using Pkg - Pkg.develop(; path=pwd()) - Pkg.add("AMDGPU")' || exit 3 - - julia -e 'println("+++ :julia: Running tests") - using Pkg - Pkg.test("DistanceTransforms"; coverage=true, test_args=["AMDGPU"])' - agents: - queue: "juliagpu" - rocm: "*" - timeout_in_minutes: 5 \ No newline at end of file diff --git a/.github/workflows/Benchmark.yml b/.github/workflows/Benchmark.yml index ccbcb53..844ab44 100644 --- a/.github/workflows/Benchmark.yml +++ b/.github/workflows/Benchmark.yml @@ -8,20 +8,24 @@ permissions: on: pull_request: branches: - - master + - main paths: + - "src/**/*" + - "ext/**/*" + - "Project.toml" - "benchmarks/**/*" - ".buildkite/**/*" - - "Project.toml" - - ".github/Benchmark.yml" + - ".github/workflows/Benchmark.yml" push: branches: - - master + - main paths: + - "src/**/*" + - "ext/**/*" + - "Project.toml" - "benchmarks/**/*" - ".buildkite/**/*" - - "Project.toml" - - ".github/Benchmark.yml" + - ".github/workflows/Benchmark.yml" jobs: benchmark: @@ -29,6 +33,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - name: Download Buildkite Artifacts id: download uses: EnricoMi/download-buildkite-artifact-action@v1 @@ -47,12 +52,11 @@ jobs: if: ${{ steps.locate.outputs.path != '' }} uses: benchmark-action/github-action-benchmark@v1 with: - name: DistanceTransforms Benchmarks + name: Package Benchmarks tool: 'julia' output-file-path: ${{ steps.locate.outputs.path }} benchmark-data-dir-path: "benchmarks" github-token: ${{ secrets.GITHUB_TOKEN }} - # comment-on-alert: true comment-always: true summary-always: true alert-threshold: "150%" diff --git a/benchmarks/aggregate.jl b/benchmarks/aggregate.jl index 67f8b02..d55c914 100644 --- a/benchmarks/aggregate.jl +++ b/benchmarks/aggregate.jl @@ -50,4 +50,4 @@ for backend in GPU_BACKENDS end # Save the combined results -BenchmarkTools.save(joinpath(@__DIR__, "results", "combinedbenchmarks.json"), RESULTS) +BenchmarkTools.save(joinpath(@__DIR__, "results", "combinedbenchmarks.json"), RESULTS) \ No newline at end of file diff --git a/benchmarks/runbenchmarks.jl b/benchmarks/runbenchmarks.jl index 57c2e60..722fc0a 100644 --- a/benchmarks/runbenchmarks.jl +++ b/benchmarks/runbenchmarks.jl @@ -24,4 +24,4 @@ filename = BENCHMARK_GROUP == "CPU" ? string(BENCHMARK_GROUP, "benchmarks.json") BenchmarkTools.save(joinpath(filepath, filename), median(results)) -@info "Saved results to $(joinpath(filepath, filename))" +@info "Saved results to $(joinpath(filepath, filename))" \ No newline at end of file diff --git a/benchmarks/setup.jl b/benchmarks/setup.jl index 7eaf4c2..d9bd234 100644 --- a/benchmarks/setup.jl +++ b/benchmarks/setup.jl @@ -25,8 +25,11 @@ elseif BENCHMARK_GROUP == "oneAPI" end function setup_benchmarks(suite::BenchmarkGroup, backend::String, num_cpu_threads::Int64) - sizes_2D = [2^i for i in 3:12] - sizes_3D = [2^i for i in 0:8] + # sizes_2D = [2^i for i in 3:12] + # sizes_3D = [2^i for i in 0:8] + + # sizes_2D = [2^i for i in 3:4] + # sizes_3D = [2^i for i in 0:1] if backend == "CPU" # 2D benchmarks @@ -127,4 +130,4 @@ function setup_benchmarks(suite::BenchmarkGroup, backend::String, num_cpu_thread else @error "Unknown backend: $backend" end -end +end \ No newline at end of file