[Mlir-commits] [mlir] [mlir][TensorToSPIRV] Add check for `tensor.extract` in TensorToSPIRV (PR #107110)

Longsheng Mou llvmlistbot at llvm.org
Tue Sep 3 07:07:34 PDT 2024


================
@@ -45,6 +45,9 @@ class TensorExtractPattern final
                   ConversionPatternRewriter &rewriter) const override {
     auto tensorType = cast<RankedTensorType>(extractOp.getTensor().getType());
 
+    if (!tensorType.getElementType().isIntOrFloat())
+      return rewriter.notifyMatchFailure(extractOp,
+                                         "only integers and floats supported");
----------------
CoTinker wrote:

Good idea, I'll fix it.

https://github.com/llvm/llvm-project/pull/107110


More information about the Mlir-commits mailing list