[Mlir-commits] [mlir] ec44e08 - [MLIR] Move JitRunner to live with ExecutionEngine

Stephen Neuendorffer llvmlistbot at llvm.org
Fri May 15 14:41:20 PDT 2020


Author: Stephen Neuendorffer
Date: 2020-05-15T14:37:10-07:00
New Revision: ec44e08940f872a71c6445bcaa65708db23ed7f4

URL: https://github.com/llvm/llvm-project/commit/ec44e08940f872a71c6445bcaa65708db23ed7f4
DIFF: https://github.com/llvm/llvm-project/commit/ec44e08940f872a71c6445bcaa65708db23ed7f4.diff

LOG: [MLIR] Move JitRunner to live with ExecutionEngine

The JitRunner library is logically very close to the execution engine,
and shares similar dependencies.

find -name "*.cpp" -exec sed -i "s/Support\/JitRunner/ExecutionEngine\/JitRunner/" "{}" \;

Differential Revision: https://reviews.llvm.org/D79899

Added: 
    mlir/include/mlir/ExecutionEngine/JitRunner.h
    mlir/lib/ExecutionEngine/JitRunner.cpp

Modified: 
    mlir/lib/ExecutionEngine/CMakeLists.txt
    mlir/lib/Support/CMakeLists.txt
    mlir/tools/mlir-cpu-runner/mlir-cpu-runner.cpp
    mlir/tools/mlir-cuda-runner/mlir-cuda-runner.cpp
    mlir/tools/mlir-vulkan-runner/mlir-vulkan-runner.cpp

Removed: 
    mlir/include/mlir/Support/JitRunner.h
    mlir/lib/Support/JitRunner.cpp


################################################################################
diff  --git a/mlir/include/mlir/Support/JitRunner.h b/mlir/include/mlir/ExecutionEngine/JitRunner.h
similarity index 100%
rename from mlir/include/mlir/Support/JitRunner.h
rename to mlir/include/mlir/ExecutionEngine/JitRunner.h

diff  --git a/mlir/lib/ExecutionEngine/CMakeLists.txt b/mlir/lib/ExecutionEngine/CMakeLists.txt
index 06e25dcf27b8..ca62502e8c85 100644
--- a/mlir/lib/ExecutionEngine/CMakeLists.txt
+++ b/mlir/lib/ExecutionEngine/CMakeLists.txt
@@ -6,6 +6,7 @@ set(LLVM_OPTIONAL_SOURCES
   ExecutionEngine.cpp
   RunnerUtils.cpp
   OptUtils.cpp
+  JitRunner.cpp
   )
 
 add_mlir_library(MLIRExecutionEngine
@@ -42,6 +43,31 @@ add_mlir_library(MLIRExecutionEngine
   MLIRTargetLLVMIR
   )
 
+add_mlir_library(MLIRJitRunner
+  JitRunner.cpp
+
+  EXCLUDE_FROM_LIBMLIR
+
+  DEPENDS
+  intrinsics_gen
+
+  LINK_COMPONENTS
+  Core
+  OrcJIT
+  JITLink
+  Support
+
+  LINK_LIBS PUBLIC
+  MLIRExecutionEngine
+  MLIRIR
+  MLIRParser
+  MLIRStandardOps
+  MLIRTargetLLVMIR
+  MLIRTransforms
+  MLIRStandardToLLVM
+  MLIRSupport
+)
+
 add_mlir_library(mlir_c_runner_utils
   SHARED
   CRunnerUtils.cpp

diff  --git a/mlir/lib/Support/JitRunner.cpp b/mlir/lib/ExecutionEngine/JitRunner.cpp
similarity index 99%
rename from mlir/lib/Support/JitRunner.cpp
rename to mlir/lib/ExecutionEngine/JitRunner.cpp
index 13d53bce2a49..b14e606e847d 100644
--- a/mlir/lib/Support/JitRunner.cpp
+++ b/mlir/lib/ExecutionEngine/JitRunner.cpp
@@ -14,7 +14,7 @@
 // transformation.
 //===----------------------------------------------------------------------===//
 
-#include "mlir/Support/JitRunner.h"
+#include "mlir/ExecutionEngine/JitRunner.h"
 
 #include "mlir/Dialect/LLVMIR/LLVMDialect.h"
 #include "mlir/ExecutionEngine/ExecutionEngine.h"

diff  --git a/mlir/lib/Support/CMakeLists.txt b/mlir/lib/Support/CMakeLists.txt
index dcb28518b1a2..2e380c0726be 100644
--- a/mlir/lib/Support/CMakeLists.txt
+++ b/mlir/lib/Support/CMakeLists.txt
@@ -1,6 +1,5 @@
 set(LLVM_OPTIONAL_SOURCES
   FileUtilities.cpp
-  JitRunner.cpp
   MlirOptMain.cpp
   StorageUniquer.cpp
   ToolUtilities.cpp
@@ -34,30 +33,3 @@ add_mlir_library(MLIROptLib
   MLIRParser
   MLIRSupport
   )
-
-# Exclude from libMLIR.so because the JIT infrastructure
-# is a big dependency which most don't need.
-add_mlir_library(MLIRJitRunner
-  JitRunner.cpp
-
-  DEPENDS
-  intrinsics_gen
-
-  EXCLUDE_FROM_LIBMLIR
-
-  LINK_COMPONENTS
-  Core
-  OrcJIT
-  JITLink
-  Support
-
-  LINK_LIBS PUBLIC
-  MLIRExecutionEngine
-  MLIRIR
-  MLIRParser
-  MLIRStandardOps
-  MLIRTargetLLVMIR
-  MLIRTransforms
-  MLIRStandardToLLVM
-  MLIRSupport
-)

diff  --git a/mlir/tools/mlir-cpu-runner/mlir-cpu-runner.cpp b/mlir/tools/mlir-cpu-runner/mlir-cpu-runner.cpp
index ddb843530e7b..3e93bc6cec64 100644
--- a/mlir/tools/mlir-cpu-runner/mlir-cpu-runner.cpp
+++ b/mlir/tools/mlir-cpu-runner/mlir-cpu-runner.cpp
@@ -12,11 +12,11 @@
 //
 //===----------------------------------------------------------------------===//
 
+#include "mlir/ExecutionEngine/JitRunner.h"
+#include "mlir/ExecutionEngine/OptUtils.h"
 #include "mlir/InitAllDialects.h"
-#include "mlir/Support/JitRunner.h"
 #include "llvm/Support/InitLLVM.h"
 #include "llvm/Support/TargetSelect.h"
-#include "mlir/ExecutionEngine/OptUtils.h"
 
 int main(int argc, char **argv) {
   mlir::registerAllDialects();

diff  --git a/mlir/tools/mlir-cuda-runner/mlir-cuda-runner.cpp b/mlir/tools/mlir-cuda-runner/mlir-cuda-runner.cpp
index 91dc50149748..e784a0abf835 100644
--- a/mlir/tools/mlir-cuda-runner/mlir-cuda-runner.cpp
+++ b/mlir/tools/mlir-cuda-runner/mlir-cuda-runner.cpp
@@ -22,13 +22,13 @@
 #include "mlir/Dialect/GPU/Passes.h"
 #include "mlir/Dialect/LLVMIR/LLVMDialect.h"
 #include "mlir/Dialect/LLVMIR/NVVMDialect.h"
+#include "mlir/ExecutionEngine/JitRunner.h"
 #include "mlir/ExecutionEngine/OptUtils.h"
 #include "mlir/IR/Function.h"
 #include "mlir/IR/Module.h"
 #include "mlir/InitAllDialects.h"
 #include "mlir/Pass/Pass.h"
 #include "mlir/Pass/PassManager.h"
-#include "mlir/Support/JitRunner.h"
 #include "mlir/Transforms/DialectConversion.h"
 #include "mlir/Transforms/Passes.h"
 #include "llvm/Support/InitLLVM.h"

diff  --git a/mlir/tools/mlir-vulkan-runner/mlir-vulkan-runner.cpp b/mlir/tools/mlir-vulkan-runner/mlir-vulkan-runner.cpp
index b077a887bf9d..c792f38bdb82 100644
--- a/mlir/tools/mlir-vulkan-runner/mlir-vulkan-runner.cpp
+++ b/mlir/tools/mlir-vulkan-runner/mlir-vulkan-runner.cpp
@@ -19,11 +19,11 @@
 #include "mlir/Dialect/GPU/Passes.h"
 #include "mlir/Dialect/SPIRV/Passes.h"
 #include "mlir/Dialect/SPIRV/SPIRVOps.h"
+#include "mlir/ExecutionEngine/JitRunner.h"
 #include "mlir/ExecutionEngine/OptUtils.h"
 #include "mlir/InitAllDialects.h"
 #include "mlir/Pass/Pass.h"
 #include "mlir/Pass/PassManager.h"
-#include "mlir/Support/JitRunner.h"
 #include "llvm/Support/InitLLVM.h"
 #include "llvm/Support/TargetSelect.h"
 


        


More information about the Mlir-commits mailing list