Skip to content

Commit 740507e

Browse files
Merge pull request #1829 from CliMA/ck/gpu_column_benchmarks
Add GPU job for stencil benchmarks
2 parents 161d952 + a0ebd87 commit 740507e

File tree

4 files changed

+120
-99
lines changed

4 files changed

+120
-99
lines changed

.buildkite/pipeline.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1183,7 +1183,16 @@ steps:
11831183
- label: "Perf: FD operator benchmarks"
11841184
key: "perf_fd_ops"
11851185
command: "julia --color=yes --project=.buildkite test/Operators/finitedifference/benchmark_column.jl"
1186-
soft_fail: true
1186+
1187+
- label: "Perf: GPU FD operator benchmarks"
1188+
key: "gpu_perf_fd_ops"
1189+
command:
1190+
- "julia --project=.buildkite -e 'using CUDA; CUDA.versioninfo()'"
1191+
- "julia --color=yes --project=.buildkite test/Operators/finitedifference/benchmark_column.jl"
1192+
env:
1193+
CLIMACOMMS_DEVICE: "CUDA"
1194+
agents:
1195+
slurm_gpus: 1
11871196

11881197
- label: "Perf: SEM operator benchmarks (cuda Float32)"
11891198
key: "perf_gpu_spectral_ops_cuda_float32"
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
#=
2-
julia --project=test
2+
julia --project
33
using Revise; include(joinpath("test", "Operators", "finitedifference", "benchmark_column.jl"))
44
=#
55
include("benchmark_column_utils.jl")
66

77
@testset "Benchmark operators" begin
8-
benchmark_operators(1000, Float64)
8+
benchmark_operators(Float64; z_elems = 63, helem = 30, Nq = 4)
99
end
1010

1111
nothing

test/Operators/finitedifference/benchmark_column_kernels.jl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#### Gradients
2-
function op_GradientF2C!(c, f, bcs = ())
2+
function op_GradientF2C!(c, f, bcs = (;))
33
∇f = Operators.GradientF2C(bcs)
44
@. c.∇x = ∇f(f.y)
55
return nothing
@@ -10,7 +10,7 @@ function op_GradientC2F!(c, f, bcs)
1010
return nothing
1111
end
1212
#### Divergences
13-
function op_DivergenceF2C!(c, f, bcs = ())
13+
function op_DivergenceF2C!(c, f, bcs = (;))
1414
div = Operators.DivergenceF2C(bcs)
1515
@. c.x = div(Geometry.WVector(f.y))
1616
return nothing
@@ -21,7 +21,7 @@ function op_DivergenceC2F!(c, f, bcs)
2121
return nothing
2222
end
2323
#### Interpolations
24-
function op_InterpolateF2C!(c, f, bcs = ())
24+
function op_InterpolateF2C!(c, f, bcs = (;))
2525
interp = Operators.InterpolateF2C(bcs)
2626
@. c.x = interp(f.y)
2727
return nothing
@@ -36,7 +36,7 @@ function op_LeftBiasedC2F!(c, f, bcs)
3636
@. f.x = interp(c.y)
3737
return nothing
3838
end
39-
function op_LeftBiasedF2C!(c, f, bcs = ())
39+
function op_LeftBiasedF2C!(c, f, bcs = (;))
4040
interp = Operators.LeftBiasedF2C(bcs)
4141
@. c.x = interp(f.y)
4242
return nothing
@@ -46,24 +46,24 @@ function op_RightBiasedC2F!(c, f, bcs)
4646
@. f.x = interp(c.y)
4747
return nothing
4848
end
49-
function op_RightBiasedF2C!(c, f, bcs = ())
49+
function op_RightBiasedF2C!(c, f, bcs = (;))
5050
interp = Operators.RightBiasedF2C(bcs)
5151
@. c.x = interp(f.y)
5252
return nothing
5353
end
5454
#### Curl
55-
function op_CurlC2F!(c, f, bcs = ())
55+
function op_CurlC2F!(c, f, bcs = (;))
5656
curl = Operators.CurlC2F(bcs)
5757
@. f.curluₕ = curl(c.uₕ)
5858
return nothing
5959
end
6060
#### Mixed/adaptive
61-
function op_UpwindBiasedProductC2F!(c, f, bcs = ())
61+
function op_UpwindBiasedProductC2F!(c, f, bcs = (;))
6262
upwind = Operators.UpwindBiasedProductC2F(bcs)
6363
@. f.contra3 = upwind(f.w, c.x)
6464
return nothing
6565
end
66-
function op_Upwind3rdOrderBiasedProductC2F!(c, f, bcs = ())
66+
function op_Upwind3rdOrderBiasedProductC2F!(c, f, bcs = (;))
6767
upwind = Operators.Upwind3rdOrderBiasedProductC2F(bcs)
6868
@. f.contra3 = upwind(f.w, c.x)
6969
return nothing

0 commit comments

Comments
 (0)