brintos

brintos / llvm-project-archived public Read only

0
0
Text · 460 B · c37c520 Raw
23 lines · python
1# RUN: %PYTHON %s | FileCheck %s2 3from mlir.ir import *4from mlir.passmanager import *5 6from mlir.dialects import sparse_tensor as st7 8 9def run(f):10    print("\nTEST:", f.__name__)11    f()12    return f13 14 15# CHECK-LABEL: TEST: testSparseTensorPass16@run17def testSparseTensorPass():18    with Context() as context:19        PassManager.parse("any(sparsification)")20        PassManager.parse("any(sparse-tensor-conversion)")21    # CHECK: SUCCESS22    print("SUCCESS")23