13 lines · plain
1// RUN: mlir-opt %s -one-shot-bufferize -verify-diagnostics2 3#SparseVector = #sparse_tensor.encoding<{4 map = (d0) -> (d0 : compressed)5}>6 7func.func @sparse_tensor_op(%arg0: tensor<64xf32, #SparseVector>) -> tensor<64xf32, #SparseVector> {8 // expected-error @below{{sparse_tensor ops must be bufferized with the sparsifier}}9 // expected-error @below{{failed to bufferize op}}10 %0 = sparse_tensor.convert %arg0 : tensor<64xf32, #SparseVector> to tensor<64xf32, #SparseVector>11 return %0 : tensor<64xf32, #SparseVector>12}13