Skip to content

Commit 4915fa5

Browse files
committed
Add sorting benchmarks
1 parent 12641d7 commit 4915fa5

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

perf/array.jl

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -148,11 +148,23 @@ let group = addgroup!(group, "random")
148148
end
149149
end
150150

151-
# let group = addgroup!(group, "sorting")
152-
# group["1d"] = @benchmarkable Metal.@sync sort($gpu_vec)
153-
# group["2d"] = @benchmarkable Metal.@sync sort($gpu_mat; dims=1)
154-
# group["by"] = @benchmarkable Metal.@sync sort($gpu_vec; by=sin)
155-
# end
151+
let group = addgroup!(group, "sorting")
152+
let group = addgroup!(group, "Float32")
153+
group["1d"] = @benchmarkable Metal.@sync sort($gpu_vec)
154+
group["by=sin"] = @benchmarkable Metal.@sync sort($gpu_vec; by=sin)
155+
# group["dims=1"] = @benchmarkable Metal.@sync sort($gpu_mat; dims=1)
156+
# group["dims=2"] = @benchmarkable Metal.@sync sort($gpu_mat; dims=2)
157+
# group["dims=1L"] = @benchmarkable Metal.@sync sort($gpu_mat_long; dims=1)
158+
# group["dims=2L"] = @benchmarkable Metal.@sync sort($gpu_mat_long; dims=2)
159+
end
160+
let group = addgroup!(group, "Int64")
161+
group["1d"] = @benchmarkable Metal.@sync sort($gpu_vec_ints)
162+
# group["dims=1"] = @benchmarkable Metal.@sync sort($gpu_mat_ints; dims=1)
163+
# group["dims=2"] = @benchmarkable Metal.@sync sort($gpu_mat_ints; dims=2)
164+
# group["dims=1L"] = @benchmarkable Metal.@sync sort($gpu_mat_long_ints; dims=1)
165+
# group["dims=2L"] = @benchmarkable Metal.@sync sort($gpu_mat_long_ints; dims=2)
166+
end
167+
end
156168

157169
let group = addgroup!(group, "permutedims")
158170
group["2d"] = @benchmarkable Metal.@sync permutedims($gpu_mat, (2,1))

0 commit comments

Comments
 (0)