[mlir][SerializeToHsaco] Minimize dependencies of AMDGPU compilation
authorKrzysztof Drewniak <Krzysztof.Drewniak@amd.com>
Mon, 14 Nov 2022 21:53:10 +0000 (21:53 +0000)
committerKrzysztof Drewniak <Krzysztof.Drewniak@amd.com>
Tue, 15 Nov 2022 20:31:06 +0000 (20:31 +0000)
The SerializeToHsaco uses functions from ExecutionEngineUtils to set
up LLVM pass pipelines, but does not otherwise depend on the execution
engine (except indirectly via a dependency on IPO). This commit
removes the dependency on the execution engine to prevent
unnecessarily compilations.

Reviewed By: ThomasRaoux

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

mlir/lib/Dialect/GPU/CMakeLists.txt

index 53dd163..94f3ab5 100644 (file)
@@ -9,6 +9,7 @@ endif()
 if (MLIR_ENABLE_ROCM_CONVERSIONS)
   set(AMDGPU_LIBS
     IRReader
+    IPO
     linker
     MCParser
     AMDGPUAsmParser
@@ -139,7 +140,6 @@ if(MLIR_ENABLE_ROCM_CONVERSIONS)
 
   target_link_libraries(MLIRGPUTransforms
     PRIVATE
-    MLIRExecutionEngine
     MLIRROCDLToLLVMIRTranslation
   )
 endif()