Closed
Description
Currently, there isn't a practical method for using dynamic shared memory, whether in the NVGPU or GPU dialects. One workaround is to create 0-sized global memrefs or LLVM arrays, but this approach seems somewhat ugly (works because it fits LLVM's NVPTX expectations). I believe we can handle this more elegantly in MLIR, and hide the ugliness behind this dialects.
Example of using 0-sized memref
RFC: https://discourse.llvm.org/t/rfc-simplifying-dynamic-shared-memory-access-in-gpu/