11 lines · plain
1// RUN: mlir-opt --split-input-file -pass-pipeline="builtin.module(func.func(tosa-to-tensor))" %s -verify-diagnostics2 3// CHECK-LABEL: @slice_resultType_unranked4func.func @slice_resultType_unranked(%arg0: tensor<?xf32>) -> (tensor<*xf32>) {5 %0 = tosa.const_shape {values = dense<2> : tensor<1xindex>} : () -> !tosa.shape<1>6 %1 = tosa.const_shape {values = dense<0> : tensor<1xindex>} : () -> !tosa.shape<1>7 // expected-error@+1 {{failed to legalize operation 'tosa.slice'}}8 %2 = tosa.slice %arg0, %0, %1 : (tensor<?xf32>, !tosa.shape<1>, !tosa.shape<1>) -> tensor<*xf32>9 return %2 : tensor<*xf32>10}11