[Mlir-commits] [mlir] Align TOSA->EmitC integration tests with MLGO config (PR #216787)
Andrzej WarzyĆski
llvmlistbot at llvm.org
Tue Aug 18 05:13:22 PDT 2026
================
@@ -1,21 +1,56 @@
+// DEFINE: %{wrap_in_class_passes} =
+// DEFINE: %{promote_to_stack_pass} =
+
// DEFINE: %{pipeline} = "builtin.module(\
+// DEFINE: func.func(\
+// DEFINE: tosa-to-linalg-named,\
+// DEFINE: tosa-to-linalg,\
+// DEFINE: tosa-to-arith,\
+// DEFINE: tosa-to-tensor\
+// DEFINE: ),\
// DEFINE: symbol-privatize,\
// DEFINE: scalarize-single-element-tensor-return,\
// DEFINE: one-shot-bufferize{\
// DEFINE: bufferize-function-boundaries=true\
// DEFINE: function-boundary-type-conversion=identity-layout-map\
+// DEFINE: buffer-alignment=0\
// DEFINE: },\
+// DEFINE: buffer-results-to-out-params{\
+// DEFINE: hoist-static-allocs=true\
+// DEFINE: }%{promote_to_stack_pass},\
// DEFINE: buffer-deallocation-pipeline,\
-// DEFINE: convert-to-emitc\
-// DEFINE: )"
+// DEFINE: func.func(\
+// DEFINE: convert-linalg-to-loops\
+// DEFINE: ),\
+// DEFINE: expand-strided-metadata,\
+// DEFINE: canonicalize,\
+// DEFINE: memref-elide-reinterpret-cast,\
+// DEFINE: math-expand-ops{ops=rsqrt},\
+// DEFINE: arith-expand{\
+// DEFINE: include-min-max-f=true\
+// DEFINE: include-min-max-i=true\
+// DEFINE: },\
+// DEFINE: convert-to-emitc,\
+// DEFINE: convert-math-to-emitc,\
+// DEFINE: convert-arith-to-emitc%{wrap_in_class_passes})"
// DEFINE: %{lower_to_emitc} = mlir-opt --pass-pipeline=%{pipeline} %s -o %t
-// DEFINE: %{translate} = mlir-translate -mlir-to-cpp %t -o %t.c
-// DEFINE: %{compile} = %host_cc -include stdint.h -fsyntax-only -Wpedantic -Wall -Werror -Wno-unused %t.c
+// DEFINE: %{translate} = mlir-translate -mlir-to-cpp %t -o %t.cpp
+// DEFINE: %{compile} = %host_cc -include stdint.h -fsyntax-only -Wpedantic -Wall -Werror -Wno-unused %t.cpp
/// Lower via the pipeline defined above
// RUN: rm -f %t && %{lower_to_emitc} && FileCheck %s --input-file=%t && %{translate} && %{compile}
+// REDEFINE: %{wrap_in_class_passes} = ,\
+// REDEFINE: wrap-emitc-func-in-class,\
+// REDEFINE: mlgo-add-reflection-map{\
+// REDEFINE: included-field-attrs=tf_saved_model.index_path\
+// REDEFINE: }
+
+// REDEFINE: %{promote_to_stack_pass} = ",\func.func(promote-buffers-to-stack)"
+
+// RUN: rm -f %t && %{lower_to_emitc} && FileCheck %s --input-file=%t && %{translate} && %{compile}
----------------
banach-space wrote:
How does this RUN line differ from the one above? Please add comment.
https://github.com/llvm/llvm-project/pull/216787
More information about the Mlir-commits
mailing list