1# RUN: %PYTHON %s | FileCheck %s 2 3from mlir.ir import * 4from mlir.passmanager import * 5 6from mlir.dialects import sparse_tensor as st 7 8 9def run(f): 10 print('\nTEST:', f.__name__) 11 f() 12 return f 13 14 15# CHECK-LABEL: TEST: testSparseTensorPass 16@run 17def testSparseTensorPass(): 18 with Context() as context: 19 PassManager.parse('sparsification') 20 PassManager.parse('sparse-tensor-conversion') 21 # CHECK: SUCCESS 22 print('SUCCESS') 23