Skip to content

Commit

Permalink
add aie-opt lit testing config
Browse files Browse the repository at this point in the history
  • Loading branch information
jorendumoulin committed Dec 17, 2024
1 parent bfa0962 commit 3fb8e31
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/filecheck/dialects/aie.mlir
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// RUN: XDSL_ROUNDTRIP
// RUN: AIE_ROUNDTRIP

"test.op"() : () -> ()
arith.constant 5 : i32

// CHECK: "test.op"() : () -> ()
// CHECK: arith.constant 5 : i32
8 changes: 8 additions & 0 deletions tests/filecheck/lit.cfg
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
import lit.formats
import os
import shutil

config.name = "xdsl-aie"
config.test_format = lit.formats.ShTest()
config.suffixes = ['.mlir']

config.substitutions.append(('XDSL_ROUNDTRIP', "xdsl-aie-opt %s --print-op-generic --split-input-file | xdsl-aie-opt --split-input-file | filecheck %s"))
config.substitutions.append(("XDSL_GENERIC_ROUNDTRIP", "xdsl-aie-opt %s --print-op-generic --split-input-file | filecheck %s --check-prefix=CHECK-GENERIC"))

if shutil.which("aie-opt"):
config.substitutions.append(('AIE_ROUNDTRIP', "xdsl-aie-opt %s --split-input-file | aie-opt --split-input-file | xdsl-aie-opt --split-input-file | filecheck %s"))
config.substitutions.append(("AIE_GENERIC_ROUNDTRIP", "xdsl-aie-opt %s --print-op-generic --split-input-file | aie-opt --split-input-file --mlir-print-op-generic | xdsl-aie-opt --split-input-file --print-op-generic | filecheck %s --check-prefix=CHECK-GENERIC"))
else:
config.substitutions.append(('AIE_ROUNDTRIP', ":"))
config.substitutions.append(("AIE_GENERIC_ROUNDTRIP", ":"))

0 comments on commit 3fb8e31

Please sign in to comment.