[Mlir-commits] [mlir] [mlir][nvgpu] Remove strict verifiers on `warpgroup.generate.descriptor` (PR #69935)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Mon Oct 23 08:22:08 PDT 2023
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-mlir-gpu
Author: Guray Ozen (grypp)
<details>
<summary>Changes</summary>
This PR relaxes some rules in the verifier. I found this to be overly restrictive. It's certainly possible to work around these rules, for example one way is to generate additional subview and etc., but this just bloats the IR.
---
Full diff: https://github.com/llvm/llvm-project/pull/69935.diff
1 Files Affected:
- (modified) mlir/lib/Dialect/NVGPU/IR/NVGPUDialect.cpp (-6)
``````````diff
diff --git a/mlir/lib/Dialect/NVGPU/IR/NVGPUDialect.cpp b/mlir/lib/Dialect/NVGPU/IR/NVGPUDialect.cpp
index f5b02fe1b515591..15eeba2839479d8 100644
--- a/mlir/lib/Dialect/NVGPU/IR/NVGPUDialect.cpp
+++ b/mlir/lib/Dialect/NVGPU/IR/NVGPUDialect.cpp
@@ -375,15 +375,9 @@ LogicalResult WarpgroupGenerateDescriptorOp::verify() {
MemRefType memrefType = getTensor().getType();
MemRefType tensorMapType = getTensorMap().getType().getTensor();
- if (memrefType != tensorMapType)
- return emitError() << "memref and tensor map type mismatch";
-
if (!memrefType.hasStaticShape() || !tensorMapType.hasStaticShape())
return emitError() << "supports only static shapes";
- if (memrefType.getRank() != 2)
- return emitError() << "supports only 2d memref is supported for now";
-
if (getTensorMap().getType().getSwizzle() !=
TensorMapSwizzleKind::SWIZZLE_128B) {
return emitError() << "supports only "
``````````
</details>
https://github.com/llvm/llvm-project/pull/69935
More information about the Mlir-commits
mailing list