@@ -13,7 +13,8 @@ function create_histogram(input)
13
13
end
14
14
15
15
# This a 1D histogram kernel where the histogramming happens on shmem
16
- @kernel unsafe_indices= true function histogram_kernel! (histogram_output, input)
16
+ # @kernel unsafe_indices=true function histogram_kernel!(histogram_output, input)
17
+ @kernel function histogram_kernel! (histogram_output, input)
17
18
tid = @index (Global, Linear)
18
19
lid = @index (Local, Linear)
19
20
77
78
all_two = fill (Int32 (2 ), 512 )
78
79
79
80
histogram_rand_baseline = create_histogram (rand_input)
80
- histogram_linear_baseline = create_histogram (linear_input)
81
- histogram_two_baseline = create_histogram (all_two)
81
+ # histogram_linear_baseline = create_histogram(linear_input)
82
+ # histogram_two_baseline = create_histogram(all_two)
82
83
83
84
rand_input = move (backend, rand_input)
84
- linear_input = move (backend, linear_input)
85
- all_two = move (backend, all_two)
85
+ # linear_input = move(backend, linear_input)
86
+ # all_two = move(backend, all_two)
86
87
87
88
rand_histogram = KernelAbstractions. zeros (backend, eltype (rand_input), Int (maximum (rand_input)))
88
- linear_histogram = KernelAbstractions. zeros (backend, eltype (linear_input), Int (maximum (linear_input)))
89
- two_histogram = KernelAbstractions. zeros (backend, eltype (all_two), Int (maximum (all_two)))
89
+ # linear_histogram = KernelAbstractions.zeros(backend, eltype(linear_input), Int(maximum(linear_input)))
90
+ # two_histogram = KernelAbstractions.zeros(backend, eltype(all_two), Int(maximum(all_two)))
90
91
91
92
histogram! (rand_histogram, rand_input, 6 )
92
- histogram! (linear_histogram, linear_input)
93
- histogram! (two_histogram, all_two)
93
+ # histogram!(linear_histogram, linear_input)
94
+ # histogram!(two_histogram, all_two)
94
95
KernelAbstractions. synchronize (backend)
95
96
96
97
@test isapprox (Array (rand_histogram), histogram_rand_baseline)
97
- @test isapprox (Array (linear_histogram), histogram_linear_baseline)
98
- @test isapprox (Array (two_histogram), histogram_two_baseline)
98
+ # @test isapprox(Array(linear_histogram), histogram_linear_baseline)
99
+ # @test isapprox(Array(two_histogram), histogram_two_baseline)
99
100
end
0 commit comments