[Mlir-commits] [mlir] [mlir][gpu] Remove `offloadingHandler` from `ModuleToBinary` (PR #90368)

Fabian Mora llvmlistbot at llvm.org
Sat Apr 27 17:49:25 PDT 2024


https://github.com/fabianmcg created https://github.com/llvm/llvm-project/pull/90368

This patch removes the `offloadingHandler` option from the `ModuleToBinary` pass. The option is removed as it cannot be parsed from textual form.

This fixes issue #90344.

>From 5136f6185ae7fcf79ee39ab0d1e07a110f5984c5 Mon Sep 17 00:00:00 2001
From: Fabian Mora <fmora.dev at gmail.com>
Date: Sun, 28 Apr 2024 00:45:14 +0000
Subject: [PATCH] [mlir][gpu] Remove `offloadingHandler` from `ModuleToBinary`

This patch removes the `offloadingHandler` option from the `ModuleToBinary`
pass. The option is removed as it cannot be parsed from textual form.

This fixes issue #90344.
---
 mlir/include/mlir/Dialect/GPU/Transforms/Passes.td | 2 --
 mlir/lib/Dialect/GPU/Transforms/ModuleToBinary.cpp | 5 +----
 2 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/mlir/include/mlir/Dialect/GPU/Transforms/Passes.td b/mlir/include/mlir/Dialect/GPU/Transforms/Passes.td
index a8235bed6f2764..4a9ddafdd177d2 100644
--- a/mlir/include/mlir/Dialect/GPU/Transforms/Passes.td
+++ b/mlir/include/mlir/Dialect/GPU/Transforms/Passes.td
@@ -88,8 +88,6 @@ def GpuModuleToBinaryPass
     4. `fatbinary`, `fatbin`: produces fatbinaries.
   }];
   let options = [
-    Option<"offloadingHandler", "handler", "Attribute", "nullptr",
-           "Offloading handler to be attached to the resulting binary op.">,
     Option<"toolkitPath", "toolkit", "std::string", [{""}],
            "Toolkit path.">,
     ListOption<"linkFiles", "l", "std::string",
diff --git a/mlir/lib/Dialect/GPU/Transforms/ModuleToBinary.cpp b/mlir/lib/Dialect/GPU/Transforms/ModuleToBinary.cpp
index 01613ab5268bc4..836e939a8295ba 100644
--- a/mlir/lib/Dialect/GPU/Transforms/ModuleToBinary.cpp
+++ b/mlir/lib/Dialect/GPU/Transforms/ModuleToBinary.cpp
@@ -88,10 +88,7 @@ void GpuModuleToBinaryPass::runOnOperation() {
   TargetOptions targetOptions(toolkitPath, linkFiles, cmdOptions, *targetFormat,
                               lazyTableBuilder);
   if (failed(transformGpuModulesToBinaries(
-          getOperation(),
-          offloadingHandler ? dyn_cast<OffloadingLLVMTranslationAttrInterface>(
-                                  offloadingHandler.getValue())
-                            : OffloadingLLVMTranslationAttrInterface(nullptr),
+          getOperation(), OffloadingLLVMTranslationAttrInterface(nullptr),
           targetOptions)))
     return signalPassFailure();
 }



More information about the Mlir-commits mailing list