[Mlir-commits] [mlir] [mlir][tosa] Fix crash in validation pass when dialect is not loaded (PR #173449)
NohHyeon Kwon
llvmlistbot at llvm.org
Wed Dec 24 00:50:08 PST 2025
================
@@ -0,0 +1,21 @@
+// RUN: mlir-opt %s -split-input-file -tosa-validate | FileCheck %s
+
+// --- First case: without TOSA Operation (#173370 bug reproduction) ---
+
+// CHECK-LABEL: func.func @test_validation_pass_init
+func.func @test_validation_pass_init(%arg0: tensor<1xf32>) -> tensor<1xf32> {
+ // CHECK: math.asin
+ %0 = math.asin %arg0 : tensor<1xf32>
+ return %0 : tensor<1xf32>
+}
+
+// -----
+
+// --- Second case: with TOSA Operation ---
+
+// CHECK-LABEL: func.func @test_tosa_ops
+func.func @test_tosa_ops(%arg0: tensor<1x2x3x4xf32>, %arg1: tensor<1x2x3x4xf32>) -> tensor<1x2x3x4xf32> {
+ // CHECK: tosa.add
+ %0 = tosa.add %arg0, %arg1 : (tensor<1x2x3x4xf32>, tensor<1x2x3x4xf32>) -> tensor<1x2x3x4xf32>
+ return %0 : tensor<1x2x3x4xf32>
+}
----------------
swote-git wrote:
Oh, i get it. I'll fix it.
https://github.com/llvm/llvm-project/pull/173449
More information about the Mlir-commits
mailing list