Skip to content

Commit 1eb6d40

Browse files
committed
test: disable pybind-related tests
1 parent 3463431 commit 1eb6d40

File tree

10 files changed

+28
-20
lines changed

10 files changed

+28
-20
lines changed

test/mlir/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ else()
2121
set(ONNX_MLIR_STABLEHLO_ENABLED 0)
2222
endif()
2323

24+
if (ONNX_MLIR_ENABLE_PYBIND)
25+
set(ONNX_MLIR_PYBIND_ENABLED 1)
26+
else()
27+
set(ONNX_MLIR_PYBIND_ENABLED 0)
28+
endif()
29+
2430
# Set LLVM_DEFAULT_EXTERNAL_LIT to an empty string to avoid warnings about the path
2531
# when using multi-config generators such as VS or Xcode
2632
set(LLVM_DEFAULT_EXTERNAL_LIT "")

test/mlir/driver/check_passthrough_options.mlir

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// REQUIRES: pybind
2+
13
// RUN: onnx-mlir -Xopt --data-sections -tag="test" -v %s -o %t 2>&1 | FileCheck --check-prefix=OPT %s
24
// RUN: onnx-mlir -Xllc --data-sections -tag="test" -v %s -o %t 2>&1 | FileCheck --check-prefix=LLC %s
35
// RUN: onnx-mlir -mllvm --data-sections -tag="test" -v %s -o %t 2>&1 | FileCheck --check-prefix=LLVM %s

test/mlir/driver/compile_phases.mlir

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,8 @@
1-
// RUN: onnx-mlir %s -o %t 2>&1 | FileCheck --check-prefix=EMIT-LIB %s && rm %t.so
1+
// Disabled as cruntime does not exist in test env (AMD): onnx-mlir %s -o %t 2>&1 | FileCheck --check-prefix=EMIT-LIB %s && rm %t.so
22
// RUN: onnx-mlir %s --EmitObj -o %t 2>&1 | FileCheck --check-prefix=EMIT-OBJ %s && rm %t.o
33
// Disabled as jni libs do not exist in test env (AMD): onnx-mlir %s --EmitJNI -o %t 2>&1 | FileCheck --check-prefix=EMIT-JNI %s && rm %t.jar
44
// RUN: onnx-mlir %s --EmitLLVMIR -o %t 2>&1 | FileCheck --check-prefix=EMIT-LLVMIR %s && rm %t.onnx.mlir
55

6-
// EMIT-LIB: [1/6] {{.*}} Importing ONNX Model to MLIR Module from
7-
// EMIT-LIB: [2/6] {{.*}} Compiling and Optimizing MLIR Module
8-
// EMIT-LIB: [3/6] {{.*}} Translating MLIR Module to LLVM and Generating LLVM Optimized Bitcode
9-
// EMIT-LIB: [4/6] {{.*}} Generating Object from LLVM Bitcode
10-
// EMIT-LIB: [5/6] {{.*}} Linking and Generating the Output Shared Library
11-
// EMIT-LIB: [6/6] {{.*}} Compilation completed
12-
136
// EMIT-OBJ: [1/5] {{.*}} Importing ONNX Model to MLIR Module from
147
// EMIT-OBJ: [2/5] {{.*}} Compiling and Optimizing MLIR Module
158
// EMIT-OBJ: [3/5] {{.*}} Translating MLIR Module to LLVM and Generating LLVM Optimized Bitcode

test/mlir/driver/invalid_output_path.mlir

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@
44
// RUN: rm -rf %t && mkdir %t
55
// RUN: cp %s %t/invalid_output_path.mlir
66

7-
// RUN: onnx-mlir %t/invalid_output_path.mlir -tag="test" -v -o %t\abc 2>&1 | FileCheck --check-prefix=VALID %s
8-
// RUN: onnx-mlir %t/invalid_output_path.mlir -tag="test" -v -o %t/abc 2>&1 | FileCheck --check-prefix=VALID %s
9-
// RUN: onnx-mlir %t/invalid_output_path.mlir -tag="test" -v -o %t/abc. 2>&1 | FileCheck --check-prefix=VALID %s
10-
// RUN: onnx-mlir %t/invalid_output_path.mlir -tag="test" -v -o %t/abc.. 2>&1 | FileCheck --check-prefix=VALID %s
11-
// RUN: onnx-mlir %t/invalid_output_path.mlir -tag="test" -v -o %t/..abc.. 2>&1 | FileCheck --check-prefix=VALID %s
7+
// RUN: onnx-mlir %t/invalid_output_path.mlir -tag="test" --EmitObj -v -o %t\abc 2>&1 | FileCheck --check-prefix=VALID %s
8+
// RUN: onnx-mlir %t/invalid_output_path.mlir -tag="test" --EmitObj -v -o %t/abc 2>&1 | FileCheck --check-prefix=VALID %s
9+
// RUN: onnx-mlir %t/invalid_output_path.mlir -tag="test" --EmitObj -v -o %t/abc. 2>&1 | FileCheck --check-prefix=VALID %s
10+
// RUN: onnx-mlir %t/invalid_output_path.mlir -tag="test" --EmitObj -v -o %t/abc.. 2>&1 | FileCheck --check-prefix=VALID %s
11+
// RUN: onnx-mlir %t/invalid_output_path.mlir -tag="test" --EmitObj -v -o %t/..abc.. 2>&1 | FileCheck --check-prefix=VALID %s
1212

13-
// RUN: onnx-mlir %t/invalid_output_path.mlir -tag="test" -v -o %t\\ 2>&1 | FileCheck --check-prefix=INVALID %s
14-
// RUN: onnx-mlir %t/invalid_output_path.mlir -tag="test" -v -o %t/ 2>&1 | FileCheck --check-prefix=INVALID %s
15-
// RUN: onnx-mlir %t/invalid_output_path.mlir -tag="test" -v -o %t/. 2>&1 | FileCheck --check-prefix=INVALID %s
16-
// RUN: onnx-mlir %t/invalid_output_path.mlir -tag="test" -v -o . 2>&1 | FileCheck --check-prefix=INVALID %s
17-
// RUN: onnx-mlir %t/invalid_output_path.mlir -tag="test" -v -o .. 2>&1 | FileCheck --check-prefix=INVALID %s
13+
// RUN: onnx-mlir %t/invalid_output_path.mlir -tag="test" --EmitObj -v -o %t\\ 2>&1 | FileCheck --check-prefix=INVALID %s
14+
// RUN: onnx-mlir %t/invalid_output_path.mlir -tag="test" --EmitObj -v -o %t/ 2>&1 | FileCheck --check-prefix=INVALID %s
15+
// RUN: onnx-mlir %t/invalid_output_path.mlir -tag="test" --EmitObj -v -o %t/. 2>&1 | FileCheck --check-prefix=INVALID %s
16+
// RUN: onnx-mlir %t/invalid_output_path.mlir -tag="test" --EmitObj -v -o . 2>&1 | FileCheck --check-prefix=INVALID %s
17+
// RUN: onnx-mlir %t/invalid_output_path.mlir -tag="test" --EmitObj -v -o .. 2>&1 | FileCheck --check-prefix=INVALID %s
1818

1919
// INVALID: Invalid -o option value {{.*}} ignored.
2020
// VALID-NOT: Invalid -o option value {{.*}} ignored.

test/mlir/driver/llvm.ident.mlir

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: onnx-mlir --preserveBitcode -tag="test" %s -o %t
1+
// RUN: onnx-mlir --preserveBitcode --EmitObj -tag="test" %s -o %t
22
// RUN: llvm-dis %t.bc -o %t.ll
33

44
module {

test/mlir/driver/product.version.mlir

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: onnx-mlir --preserveBitcode -tag="test" %s -o %t
1+
// RUN: onnx-mlir --preserveBitcode --EmitObj -tag="test" %s -o %t
22
// RUN: llvm-dis %t.bc -o %t.ll
33
// RUN: cat %t.ll | FileCheck %s
44

test/mlir/driver/unix/check_verbosity.mlir

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// RUN: onnx-mlir -tag="test" -v %s -o %t 2>&1 | FileCheck %s
22

33
// REQUIRES: system-linux
4+
// REQUIRES: pybind
45
// CHECK: opt {{.*}} -o {{.*}}check_verbosity{{.*}}.bc
56
// CHECK: llc {{.*}} -filetype=obj {{.*}} -o {{.*}}check_verbosity{{.*}}.o {{.*}}check_verbosity{{.*}}.bc
67
// CHECK: {{clang|c|g}}++{{.*}} {{.*}}check_verbosity{{.*}}.o -o {{.*}}check_verbosity{{.*}}.so -shared -fPIC -L{{.*}}/lib -lcruntime

test/mlir/driver/windows/check_verbosity.mlir

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// RUN: onnx-mlir -tag="test" -v %s -o %t 2>&1 | FileCheck %s
22

33
// REQUIRES: system-windows
4+
// REQUIRES: pybind
45
// CHECK: opt{{(\.exe)?}} {{.*}} -o {{.*}}check_verbosity{{.*}}.bc
56
// CHECK-NEXT: llc{{(\.exe)?}} {{.*}} -filetype=obj {{.*}} -o {{.*}}check_verbosity{{.*}}.obj {{.*}}check_verbosity{{.*}}.bc
67
// CHECK-NEXT: cl{{(\.exe)?}} {{.*}}check_verbosity{{.*}}.obj /Fe:{{.*}}check_verbosity{{.*}}.dll {{.*}} cruntime.lib

test/mlir/lit.cfg.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,7 @@
5151
# execution based on the available targets
5252
for arch in config.targets_to_build.split():
5353
config.available_features.add(arch.lower())
54+
55+
# Remember whether pybind11 is available
56+
if config.enable_pybind:
57+
config.available_features.add("pybind")

test/mlir/lit.site.cfg.py.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ config.onnx_mlir_tools_dir = r"@ONNX_MLIR_TOOLS_DIR@"
99
config.onnx_mlir_obj_root = r"@ONNX_MLIR_BIN_ROOT@"
1010

1111
config.enable_stablehlo = @ONNX_MLIR_STABLEHLO_ENABLED@
12+
config.enable_pybind = @ONNX_MLIR_PYBIND_ENABLED@
1213
config.enable_nnpa= 0x0@NNPA_LIT_ENABLED@
1314

1415
# Support substitution of the tools_dir with user parameters. This is

0 commit comments

Comments
 (0)