[Mlir-commits] [mlir] [mlir][gpu] Allow integer attribute as `dynamic_shared_memory_size` (PR #71509)
Nicolas Vasilache
llvmlistbot at llvm.org
Tue Nov 7 02:55:12 PST 2023
================
@@ -728,6 +730,24 @@ def GPU_LaunchOp : GPU_Op<"launch", [
/// Returns the keywords used in the custom syntax for this Op.
static StringRef getWorkgroupKeyword() { return "workgroup"; }
static StringRef getPrivateKeyword() { return "private"; }
+ static StringRef getDynamicSharedMemorySizeConstantKeyword() {
+ return "dynamicSharedMemorySizeConstant";
+ }
+
+ static int getDynamicSharedMemorySizeDynamicValue() {
+ return std::numeric_limits<int32_t>::min();
+ }
+ /// Returns a value of the dynamic shared memory size.
+ /// If it is a constant, it builds one
+ mlir::Value getDynamicSharedMemorySizeValue(OpBuilder &b) {
----------------
nicolasvasilache wrote:
Let's use a single `OpFoldResult getDynamicSharedMemorySizeDynamicValue()` instead please.
This is a more established API.
https://github.com/llvm/llvm-project/pull/71509
More information about the Mlir-commits
mailing list