You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Shared memory is a memory region that is shared between all threads in a
thread block/workgroup on GPUs. Dynamic shared memory is in that memory
region, though the allocated size is specified late, when launching a
kernel.
Shared memory in amdgpu and nvptx lives in address space 3. Dynamic
shared memory is implemented by creating an external global variable in
address space 3. The global is declared with size 0, as the actual size
is only known at runtime. It is defined behavior in LLVM to access an
external global outside the defined size.
As far as I know, there is no similar way to get the allocated size of
dynamic shared memory on amdgpu an nvptx, so users have to pass this
out-of-band or rely on target specific ways.
0 commit comments