Skip to content

Commit ca11482

Browse files
committed
Unbreak ABI
1 parent 5262c9e commit ca11482

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/KernelAbstractions.jl

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -248,8 +248,11 @@ end
248248
Declare storage that is local to a workgroup.
249249
"""
250250
macro localmem(T, dims)
251+
# Stay in sync with CUDAnative
252+
id = gensym("static_shmem")
253+
251254
return quote
252-
$SharedMemory($(esc(T)), Val($(esc(dims))))
255+
$SharedMemory($(esc(T)), Val($(esc(dims))), Val($(QuoteNode(id))))
253256
end
254257
end
255258

@@ -811,8 +814,7 @@ include("macros.jl")
811814
###
812815

813816
function Scratchpad end
814-
# SharedMemory(t::Type{T}, dims::Val{Dims}, id::Val{Id}) where {T, Dims, Id} = KernelIntrinsics.localmemory(t, dims, id)
815-
SharedMemory(t::Type{T}, dims::Val{Dims}) where {T, Dims} = KernelIntrinsics.localmemory(t, dims)
817+
SharedMemory(t::Type{T}, dims::Val{Dims}, id::Val{Id}) where {T, Dims, Id} = KernelIntrinsics.localmemory(t, dims)
816818

817819
__synchronize() = KernelIntrinsics.barrier()
818820

0 commit comments

Comments
 (0)