@@ -53,18 +53,23 @@ cpu_mat = rand(rng, Float32, m, n)
5353gpu_mat = MtlMatrix {Float32} (cpu_mat)
5454gpu_mat_long = MtlMatrix {Float32} (rand (rng, Float32, m_long, n_long))
5555gpu_vec = reshape (gpu_mat, length (gpu_mat))
56+ gpu_vec_long = reshape (gpu_mat_long, length (gpu_mat_long))
5657gpu_arr_3d = reshape (gpu_mat, (m, 40 , 25 ))
5758gpu_arr_4d = reshape (gpu_mat, (m, 10 , 10 , 10 ))
5859gpu_mat_ints = MtlMatrix {Int64} (rand (rng, - 10 : 10 , m, n))
5960gpu_mat_long_ints = MtlMatrix {Int64} (rand (rng, - 10 : 10 , m_long, n_long))
6061gpu_vec_ints = reshape (gpu_mat_ints, length (gpu_mat_ints))
6162
62- # let group = addgroup!(group, "reverse")
63- # group["1d"] = @benchmarkable Metal.@sync reverse($gpu_vec)
64- # group["2d"] = @benchmarkable Metal.@sync reverse($gpu_mat; dims=1)
65- # group["1d_inplace"] = @benchmarkable Metal.@sync reverse!($gpu_vec)
66- # group["2d_inplace"] = @benchmarkable Metal.@sync reverse!($gpu_mat; dims=1)
67- # end
63+ let group = addgroup! (group, " reverse" )
64+ group[" 1d" ] = @benchmarkable Metal. @sync reverse ($ gpu_vec)
65+ group[" 1dL" ] = @benchmarkable Metal. @sync reverse ($ gpu_vec_long)
66+ group[" 2d" ] = @benchmarkable Metal. @sync reverse ($ gpu_mat; dims= 1 )
67+ group[" 2dL" ] = @benchmarkable Metal. @sync reverse ($ gpu_mat_long; dims= 1 )
68+ group[" 1d_inplace" ] = @benchmarkable Metal. @sync reverse! ($ gpu_vec)
69+ group[" 1dL_inplace" ] = @benchmarkable Metal. @sync reverse! ($ gpu_vec_long)
70+ group[" 2d_inplace" ] = @benchmarkable Metal. @sync reverse! ($ gpu_mat; dims= 1 )
71+ group[" 2dL_inplace" ] = @benchmarkable Metal. @sync reverse! ($ gpu_mat_long; dims= 2 )
72+ end
6873
6974# 'evals=1' added to prevent hang when running benchmarks of CI
7075# TODO : Investigate cause and properly fix.
0 commit comments