[Mlir-commits] [mlir] [mlir][tosa] Fix crash in validation pass when dialect is not loaded (PR #173449)
Luke Hutton
llvmlistbot at llvm.org
Mon Jan 5 01:19:36 PST 2026
================
@@ -29,3 +29,19 @@ func.func @test_rescale_output_unsigned(%arg0: tensor<1x1xi8>) -> (tensor<1x1xui
%r = tosa.rescale %arg0, %1, %0, %3, %2 {input_unsigned = false, output_unsigned = true, per_channel = false, rounding_mode = SINGLE_ROUND, scale32 = true} : (tensor<1x1xi8>, tensor<1xi32>, tensor<1xi8>, tensor<1xi8>, tensor<1xi8>) -> tensor<1x1xui8>
return %r : tensor<1x1xui8>
}
+
+// -----
+
+// CHECK-LABEL: test_validate_without_tosa
+func.func @test_validate_without_tosa(%arg0: f32) -> f32 {
+ %0 = math.asin %arg0 : f32
+ return %0 : f32
+}
+
+// -----
+
+// CHECK-LABEL: test_validate_with_tosa
+func.func @test_validate_with_tosa(%arg0: tensor<1x2x3xf32>, %arg1: tensor<1x2x3xf32>) -> tensor<1x2x3xf32> {
----------------
lhutton1 wrote:
nit: this test doesn't seem to test any additional functionality to the tests above: https://github.com/llvm/llvm-project/pull/173449/changes#diff-14508aa37b0150b7b52c724048082f96531e23c150a152f94a0ba07b56363984R24. I think we can remove it
https://github.com/llvm/llvm-project/pull/173449
More information about the Mlir-commits
mailing list