Skip to content

Commit eb17a40

Browse files
committed
use unsafe_indices for a few examples
1 parent dab03b9 commit eb17a40

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

examples/performance.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ end
2626

2727
# Local memory variants
2828

29-
@kernel function lmem_copy_kernel!(
29+
@kernel unsafe_indices = true function lmem_copy_kernel!(
3030
output, @Const(input),
3131
::Val{BANK} = Val(1),
3232
) where {BANK}
@@ -46,7 +46,7 @@ end
4646
@inbounds output[I, J] = tile[i, j]
4747
end
4848

49-
@kernel function lmem_transpose_kernel!(
49+
@kernel unsafe_indices = true function lmem_transpose_kernel!(
5050
output, @Const(input),
5151
::Val{BANK} = Val(1),
5252
) where {BANK}
@@ -77,7 +77,7 @@ end
7777

7878
# Local Memory + process multiple elements per lane
7979

80-
@kernel function coalesced_copy_kernel!(
80+
@kernel unsafe_indices = true function coalesced_copy_kernel!(
8181
output, @Const(input),
8282
::Val{BANK} = Val(1),
8383
) where {BANK}
@@ -105,7 +105,7 @@ end
105105
end
106106
end
107107

108-
@kernel function coalesced_transpose_kernel!(
108+
@kernel unsafe_indices = true function coalesced_transpose_kernel!(
109109
output, @Const(input),
110110
::Val{BANK} = Val(1),
111111
) where {BANK}

examples/performant_matmul.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ include(joinpath(dirname(pathof(KernelAbstractions)), "../examples/utils.jl")) #
99
# Metal sometimes supports fewer.
1010
const TILE_DIM = 16
1111

12-
@kernel function coalesced_matmul_kernel!(
12+
@kernel unsafe_indices = true function coalesced_matmul_kernel!(
1313
output, @Const(input1), @Const(input2), N, R, M,
1414
::Val{BANK} = Val(1),
1515
) where {BANK}

0 commit comments

Comments
 (0)