Add support for dynamic shared memory for GPU launch ops: add an
optional operand to gpu.launch and gpu.launch_func ops to specify the
amount of "dynamic" shared memory to use. Update lowerings to connect
this operand to the GPU runtime.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/include/mlir/Dialect/GPU/GPUOps.td | ||
---|---|---|
381–382 | Would it make sense to provide a default? |
Add default value on builder for "dynamic memory size" for gpu.launch but not for gpu.launch_func.
mlir/include/mlir/Dialect/GPU/GPUOps.td | ||
---|---|---|
381–382 | Makes sense, although we'll need to provide a default value for the last argument as well if we provide it for this one. I've done this for the gpu.launch op where it's more useful. However, for this one (launch_func), I'm concerned that a default would lead to runtime breakage for any downstream users since kernelOperands in pre-existing code would then silently map to this new argument and escape a build failure. |
mlir/test/Conversion/GPUCommon/lower-launch-func-to-gpu-runtime-calls.mlir | ||
---|---|---|
27 | is there an example of how this value will be passed to the outlined kernel? |
Would it make sense to provide a default?