diff --git a/examples/performance.jl b/examples/performance.jl index 8faf3cae..34af5900 100644 --- a/examples/performance.jl +++ b/examples/performance.jl @@ -26,7 +26,7 @@ end # Local memory variants -@kernel function lmem_copy_kernel!( +@kernel unsafe_indices = true function lmem_copy_kernel!( output, @Const(input), ::Val{BANK} = Val(1), ) where {BANK} @@ -46,7 +46,7 @@ end @inbounds output[I, J] = tile[i, j] end -@kernel function lmem_transpose_kernel!( +@kernel unsafe_indices = true function lmem_transpose_kernel!( output, @Const(input), ::Val{BANK} = Val(1), ) where {BANK} @@ -77,7 +77,7 @@ end # Local Memory + process multiple elements per lane -@kernel function coalesced_copy_kernel!( +@kernel unsafe_indices = true function coalesced_copy_kernel!( output, @Const(input), ::Val{BANK} = Val(1), ) where {BANK} @@ -105,7 +105,7 @@ end end end -@kernel function coalesced_transpose_kernel!( +@kernel unsafe_indices = true function coalesced_transpose_kernel!( output, @Const(input), ::Val{BANK} = Val(1), ) where {BANK} diff --git a/examples/performant_matmul.jl b/examples/performant_matmul.jl index afd247d1..ac56edb5 100644 --- a/examples/performant_matmul.jl +++ b/examples/performant_matmul.jl @@ -9,7 +9,7 @@ include(joinpath(dirname(pathof(KernelAbstractions)), "../examples/utils.jl")) # # Metal sometimes supports fewer. const TILE_DIM = 16 -@kernel function coalesced_matmul_kernel!( +@kernel unsafe_indices = true function coalesced_matmul_kernel!( output, @Const(input1), @Const(input2), N, R, M, ::Val{BANK} = Val(1), ) where {BANK}