@@ -8,10 +8,12 @@ using BenchmarkTools
8
8
import ClimaComms
9
9
@static pkgversion (ClimaComms) >= v " 0.6" && ClimaComms. @import_required_backends
10
10
11
- function benchmarkfill! (device, data, val)
11
+ function benchmarkfill! (device, data, val, name)
12
+ println (" Benchmarking ClimaCore fill! for $name DataLayout" )
12
13
trial = @benchmark ClimaComms. @cuda_sync $ device fill! ($ data, $ val)
13
14
show (stdout , MIME (" text/plain" ), trial)
14
15
println ()
16
+ println (" Benchmarking array fill! for $name DataLayout" )
15
17
trial =
16
18
@benchmark ClimaComms. @cuda_sync $ device fill! ($ (parent (data)), $ val)
17
19
show (stdout , MIME (" text/plain" ), trial)
26
28
Nf = 1
27
29
Nv = 63
28
30
Nij = 4
29
- Nh = 30
31
+ Nh = 30 * 30 * 6
30
32
Nk = 6
31
33
# ! format: off
32
- data = DataF {S} (device_zeros (FT,Nf)); benchmarkfill! (device, data, 3 ); @test all (parent (data) .== 3 )
33
- data = IJFH {S, Nij, Nh} (device_zeros (FT,Nij,Nij,Nf,Nh)); benchmarkfill! (device, data, 3 ); @test all (parent (data) .== 3 )
34
- data = IFH {S, Nij, Nh} (device_zeros (FT,Nij,Nf,Nh)); benchmarkfill! (device, data, 3 ); @test all (parent (data) .== 3 )
35
- data = IJF {S, Nij} (device_zeros (FT,Nij,Nij,Nf)); benchmarkfill! (device, data, 3 ); @test all (parent (data) .== 3 )
36
- data = IF {S, Nij} (device_zeros (FT,Nij,Nf)); benchmarkfill! (device, data, 3 ); @test all (parent (data) .== 3 )
37
- data = VF {S, Nv} (device_zeros (FT,Nv,Nf)); benchmarkfill! (device, data, 3 ); @test all (parent (data) .== 3 )
38
- data = VIJFH {S,Nv,Nij,Nh} (device_zeros (FT,Nv,Nij,Nij,Nf,Nh));benchmarkfill! (device, data, 3 ); @test all (parent (data) .== 3 )
39
- data = VIFH {S, Nv, Nij, Nh} (device_zeros (FT,Nv,Nij,Nf,Nh)); benchmarkfill! (device, data, 3 ); @test all (parent (data) .== 3 )
34
+ data = DataF {S} (device_zeros (FT,Nf)); benchmarkfill! (device, data, 3 , " DataF " ); @test all (parent (data) .== 3 )
35
+ data = IJFH {S, Nij, Nh} (device_zeros (FT,Nij,Nij,Nf,Nh)); benchmarkfill! (device, data, 3 , " IJFH " ); @test all (parent (data) .== 3 )
36
+ data = IFH {S, Nij, Nh} (device_zeros (FT,Nij,Nf,Nh)); benchmarkfill! (device, data, 3 , " IFH " ); @test all (parent (data) .== 3 )
37
+ data = IJF {S, Nij} (device_zeros (FT,Nij,Nij,Nf)); benchmarkfill! (device, data, 3 , " IJF " ); @test all (parent (data) .== 3 )
38
+ data = IF {S, Nij} (device_zeros (FT,Nij,Nf)); benchmarkfill! (device, data, 3 , " IF " ); @test all (parent (data) .== 3 )
39
+ data = VF {S, Nv} (device_zeros (FT,Nv,Nf)); benchmarkfill! (device, data, 3 , " VF " ); @test all (parent (data) .== 3 )
40
+ data = VIJFH {S,Nv,Nij,Nh} (device_zeros (FT,Nv,Nij,Nij,Nf,Nh));benchmarkfill! (device, data, 3 , " VIJFH " ); @test all (parent (data) .== 3 )
41
+ data = VIFH {S, Nv, Nij, Nh} (device_zeros (FT,Nv,Nij,Nf,Nh)); benchmarkfill! (device, data, 3 , " VIFH " ); @test all (parent (data) .== 3 )
40
42
# ! format: on
41
43
42
44
# data = IJKFVH{S}(device_zeros(FT,Nij,Nij,Nk,Nf,Nh)); benchmarkfill!(device, data, 3); @test all(parent(data) .== 3) # TODO : test
0 commit comments