From 86e1c050e944600ebad21fb12e687e6d9de5c2e2 Mon Sep 17 00:00:00 2001 From: Mehdi Amini Date: Sat, 24 Jun 2023 03:46:10 +0200 Subject: [PATCH] Add missing dependent dialects to AsyncToAsyncRuntimePass and GpuKernelOutliningPass These aren't detected during testing most of the time because the way we are setting up mlir-opt and the fact that we always use func.func: it'll trigger the load of the InlinerInterface extension for the FuncDialect which itself loads these dialects unconditionally. --- mlir/include/mlir/Dialect/Async/Passes.td | 2 +- mlir/include/mlir/Dialect/GPU/Transforms/Passes.td | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mlir/include/mlir/Dialect/Async/Passes.td b/mlir/include/mlir/Dialect/Async/Passes.td index 8b579dd..c7ee4ba 100644 --- a/mlir/include/mlir/Dialect/Async/Passes.td +++ b/mlir/include/mlir/Dialect/Async/Passes.td @@ -44,7 +44,7 @@ def AsyncToAsyncRuntime : Pass<"async-to-async-runtime", "ModuleOp"> { let summary = "Lower all high level async operations (e.g. async.execute) to" "the explicit async.runtime and async.coro operations"; let constructor = "mlir::createAsyncToAsyncRuntimePass()"; - let dependentDialects = ["async::AsyncDialect", "func::FuncDialect"]; + let dependentDialects = ["async::AsyncDialect", "func::FuncDialect", "cf::ControlFlowDialect"]; } def AsyncFuncToAsyncRuntime : Pass<"async-func-to-async-runtime", "ModuleOp"> { diff --git a/mlir/include/mlir/Dialect/GPU/Transforms/Passes.td b/mlir/include/mlir/Dialect/GPU/Transforms/Passes.td index a144fa4..7ee90b5 100644 --- a/mlir/include/mlir/Dialect/GPU/Transforms/Passes.td +++ b/mlir/include/mlir/Dialect/GPU/Transforms/Passes.td @@ -20,7 +20,7 @@ def GpuLaunchSinkIndexComputations : Pass<"gpu-launch-sink-index-computations"> def GpuKernelOutlining : Pass<"gpu-kernel-outlining", "ModuleOp"> { let summary = "Outline gpu.launch bodies to kernel functions"; let constructor = "mlir::createGpuKernelOutliningPass()"; - let dependentDialects = ["mlir::DLTIDialect"]; + let dependentDialects = ["mlir::DLTIDialect", "cf::ControlFlowDialect"]; } def GpuAsyncRegionPass : Pass<"gpu-async-region", "func::FuncOp"> { -- 2.7.4