[Mlir-commits] [mlir] [mlir] Remove assert from GPUOps.td. (PR #83410)

Alexander Belyaev llvmlistbot at llvm.org
Thu Feb 29 03:26:08 PST 2024


https://github.com/pifon2a created https://github.com/llvm/llvm-project/pull/83410

it changes behaviour for debug vs release builds.

>From d6984a310b6ce05c83feaabde04d76abac93e5df Mon Sep 17 00:00:00 2001
From: Alexander Belyaev <pifon at google.com>
Date: Thu, 29 Feb 2024 12:24:46 +0100
Subject: [PATCH] [mlir] Remove assert from GPUOps.td.

it changes behaviour for debug vs release builds.
---
 mlir/include/mlir/Dialect/GPU/IR/GPUOps.td | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mlir/include/mlir/Dialect/GPU/IR/GPUOps.td b/mlir/include/mlir/Dialect/GPU/IR/GPUOps.td
index f38ef4d709ef44..bb373afa40ad99 100644
--- a/mlir/include/mlir/Dialect/GPU/IR/GPUOps.td
+++ b/mlir/include/mlir/Dialect/GPU/IR/GPUOps.td
@@ -61,7 +61,7 @@ class GPU_IndexOp<string mnemonic, list<Trait> traits = []> :
         llvm::function_ref<void(mlir::Value, mlir::StringRef)> setNameFn) {
       auto dimStr = stringifyDimension(getDimensionAttr().getValue());
       auto opName = getOperationName();
-      assert(opName.consume_front("gpu."));
+      opName.consume_front("gpu.");
       SmallString<8> resultName({opName, "_", dimStr});
       setNameFn(getResult(),resultName);
     }



More information about the Mlir-commits mailing list