From f3ed4de4cfcf8ffdbd2f29e638dfa28c78d38eaf Mon Sep 17 00:00:00 2001 From: "Tung D. Le" Date: Fri, 1 Nov 2024 00:37:29 -0400 Subject: [PATCH] Add more tests Signed-off-by: Tung D. Le --- test/mlir/driver/compile_phases.mlir | 49 +++++++++++++++------------- 1 file changed, 27 insertions(+), 22 deletions(-) diff --git a/test/mlir/driver/compile_phases.mlir b/test/mlir/driver/compile_phases.mlir index 10ecd926bb..3393aa28b6 100644 --- a/test/mlir/driver/compile_phases.mlir +++ b/test/mlir/driver/compile_phases.mlir @@ -1,28 +1,33 @@ -// RUN: onnx-mlir %s -o %t| FileCheck --check-prefix=LIB %s && rm %t.so -// RUN: onnx-mlir %s --EmitObj -o %t| FileCheck --check-prefix=OBJ %s && rm %t.o -// RUN: onnx-mlir %s --EmitJNI -o %t| FileCheck --check-prefix=JNI %s && rm %t.jar +// RUN: onnx-mlir %s -o %t | FileCheck --check-prefix=EMIT-LIB %s && rm %t.so +// RUN: onnx-mlir %s --EmitObj -o %t | FileCheck --check-prefix=EMIT-OBJ %s && rm %t.o +// RUN: onnx-mlir %s --EmitJNI -o %t | FileCheck --check-prefix=EMIT-JNI %s && rm %t.jar +// RUN: onnx-mlir %s --EmitLLVMIR -o %t | FileCheck --check-prefix=EMIT-LLVMIR %s && rm %t.onnx.mlir -// LIB: [1/6] {{.*}} Importing ONNX Model to MLIR Module from -// LIB: [2/6] {{.*}} Compiling and Optimizing MLIR Module -// LIB: [3/6] {{.*}} Translating MLIR Module to LLVM and Generating LLVM Optimized Bitcode -// LIB: [4/6] {{.*}} Generating Object from LLVM Bitcode -// LIB: [5/6] {{.*}} Linking and Generating the Output Shared Library -// LIB: [6/6] {{.*}} Compilation completed +// EMIT-LIB: [1/6] {{.*}} Importing ONNX Model to MLIR Module from +// EMIT-LIB: [2/6] {{.*}} Compiling and Optimizing MLIR Module +// EMIT-LIB: [3/6] {{.*}} Translating MLIR Module to LLVM and Generating LLVM Optimized Bitcode +// EMIT-LIB: [4/6] {{.*}} Generating Object from LLVM Bitcode +// EMIT-LIB: [5/6] {{.*}} Linking and Generating the Output Shared Library +// EMIT-LIB: [6/6] {{.*}} Compilation completed -// OBJ: [1/5] {{.*}} Importing ONNX Model to MLIR Module from -// OBJ: [2/5] {{.*}} Compiling and Optimizing MLIR Module -// OBJ: [3/5] {{.*}} Translating MLIR Module to LLVM and Generating LLVM Optimized Bitcode -// OBJ: [4/5] {{.*}} Generating Object from LLVM Bitcode -// OBJ: [5/5] {{.*}} Compilation completed +// EMIT-OBJ: [1/5] {{.*}} Importing ONNX Model to MLIR Module from +// EMIT-OBJ: [2/5] {{.*}} Compiling and Optimizing MLIR Module +// EMIT-OBJ: [3/5] {{.*}} Translating MLIR Module to LLVM and Generating LLVM Optimized Bitcode +// EMIT-OBJ: [4/5] {{.*}} Generating Object from LLVM Bitcode +// EMIT-OBJ: [5/5] {{.*}} Compilation completed -// JNI: [1/8] {{.*}} Importing ONNX Model to MLIR Module from -// JNI: [2/8] {{.*}} Compiling and Optimizing MLIR Module -// JNI: [3/8] {{.*}} Translating MLIR Module to LLVM and Generating LLVM Optimized Bitcode -// JNI: [4/8] {{.*}} Generating Object from LLVM Bitcode -// JNI: [5/8] {{.*}} Generating JNI Object -// JNI: [6/8] {{.*}} Linking and Generating the Output Shared Library -// JNI: [7/8] {{.*}} Creating JNI Jar -// JNI: [8/8] {{.*}} Compilation completed +// EMIT-JNI: [1/8] {{.*}} Importing ONNX Model to MLIR Module from +// EMIT-JNI: [2/8] {{.*}} Compiling and Optimizing MLIR Module +// EMIT-JNI: [3/8] {{.*}} Translating MLIR Module to LLVM and Generating LLVM Optimized Bitcode +// EMIT-JNI: [4/8] {{.*}} Generating Object from LLVM Bitcode +// EMIT-JNI: [5/8] {{.*}} Generating JNI Object +// EMIT-JNI: [6/8] {{.*}} Linking and Generating the Output Shared Library +// EMIT-JNI: [7/8] {{.*}} Creating JNI Jar +// EMIT-JNI: [8/8] {{.*}} Compilation completed + +// EMIT-LLVMIR: [1/3] {{.*}} Importing ONNX Model to MLIR Module from +// EMIT-LLVMIR: [2/3] {{.*}} Compiling and Optimizing MLIR Module +// EMIT-LLVMIR: [3/3] {{.*}} Compilation completed module { func.func @main_graph(%arg0: tensor) -> tensor { onnx.Return %arg0 : tensor