Skip to content

Commit 78c0a21

Browse files
Benchmark reverse on bigger arrays (#2833)
1 parent f2a5c87 commit 78c0a21

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

perf/array.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ cpu_mat = rand(rng, Float32, m, n)
1010
gpu_mat = CuArray{Float32}(cpu_mat)
1111
gpu_mat_long = CuArray{Float32}(rand(rng, Float32, m_long, n_long))
1212
gpu_vec = reshape(gpu_mat, length(gpu_mat))
13+
gpu_vec_long = reshape(gpu_mat_long, length(gpu_mat_long))
1314
gpu_arr_3d = reshape(gpu_mat, (m, 40, 25))
1415
gpu_arr_4d = reshape(gpu_mat, (m, 10, 10, 10))
1516
gpu_mat_ints = CuArray(rand(rng, -10:10, m, n))
@@ -52,9 +53,13 @@ end
5253

5354
let group = addgroup!(group, "reverse")
5455
group["1d"] = @async_benchmarkable reverse($gpu_vec)
56+
group["1dL"] = @async_benchmarkable reverse($gpu_vec_long)
5557
group["2d"] = @async_benchmarkable reverse($gpu_mat; dims=1)
58+
group["2dL"] = @async_benchmarkable reverse($gpu_mat_long; dims=1)
5659
group["1d_inplace"] = @async_benchmarkable reverse!($gpu_vec)
60+
group["1dL_inplace"] = @async_benchmarkable reverse!($gpu_vec_long)
5761
group["2d_inplace"] = @async_benchmarkable reverse!($gpu_mat; dims=1)
62+
group["2dL_inplace"] = @async_benchmarkable reverse!($gpu_mat_long; dims=2)
5863
end
5964

6065
group["broadcast"] = @async_benchmarkable $gpu_mat .= 0f0

0 commit comments

Comments
 (0)