Runner utils are useful beyond just CPU and hiding them within the test directory
makes it unnecessarily harder to reuse in other projects.
-//===- mlir_runner_utils.h - Utils for debugging MLIR CPU execution -------===//
+//===- RunnerUtils.h - Utils for debugging MLIR execution -----------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
-#ifndef MLIR_CPU_RUNNER_MLIRUTILS_H_
-#define MLIR_CPU_RUNNER_MLIRUTILS_H_
+
+#ifndef EXECUTIONENGINE_RUNNERUTILS_H_
+#define EXECUTIONENGINE_RUNNERUTILS_H_
#include <assert.h>
#include <cstdint>
extern "C" MLIR_RUNNER_UTILS_EXPORT void print_comma();
extern "C" MLIR_RUNNER_UTILS_EXPORT void print_newline();
-#endif // MLIR_CPU_RUNNER_MLIRUTILS_H_
+#endif // EXECUTIONENGINE_RUNNERUTILS_H_
+set(LLVM_OPTIONAL_SOURCES
+ ExecutionEngine.cpp
+ RunnerUtils.cpp
+ OptUtils.cpp
+ )
+
llvm_map_components_to_libnames(outlibs "nativecodegen" "IPO")
add_llvm_library(MLIRExecutionEngine
ExecutionEngine.cpp
LLVMTransformUtils
${outlibs})
+
+add_llvm_library(MLIRRunnerUtils SHARED RunnerUtils.cpp)
+target_compile_definitions(MLIRRunnerUtils PRIVATE mlir_runner_utils_EXPORTS)
-//===- mlir_runner_utils.cpp - Utils for MLIR CPU execution ---------------===//
+//===- RunnerUtils.cpp - Utils for MLIR CPU execution ---------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
//
//===----------------------------------------------------------------------===//
-#include "include/mlir_runner_utils.h"
+#include "mlir/ExecutionEngine/RunnerUtils.h"
#include <cinttypes>
#include <cstdio>
mlir-translate
cblas
cblas_interface
- mlir_runner_utils
+ MLIRRunnerUtils
)
if(LLVM_BUILD_EXAMPLES)
set(LLVM_OPTIONAL_SOURCES
cblas.cpp
cblas_interface.cpp
- mlir_runner_utils.cpp
)
add_llvm_library(cblas SHARED cblas.cpp)
target_link_libraries(cblas_interface PRIVATE cblas)
target_compile_definitions(cblas_interface PRIVATE cblas_interface_EXPORTS)
-add_llvm_library(mlir_runner_utils SHARED mlir_runner_utils.cpp)
-target_compile_definitions(mlir_runner_utils PRIVATE mlir_runner_utils_EXPORTS)
#ifndef MLIR_CPU_RUNNER_CBLAS_H_
#define MLIR_CPU_RUNNER_CBLAS_H_
-#include "mlir_runner_utils.h"
+#include "mlir/ExecutionEngine/RunnerUtils.h"
#ifdef _WIN32
#ifndef MLIR_CBLAS_EXPORT
#ifndef MLIR_CPU_RUNNER_CBLAS_INTERFACE_H_
#define MLIR_CPU_RUNNER_CBLAS_INTERFACE_H_
-#include "mlir_runner_utils.h"
+#include "mlir/ExecutionEngine/RunnerUtils.h"
#ifdef _WIN32
#ifndef MLIR_CBLAS_INTERFACE_EXPORT