[Mlir-commits] [mlir] Revert "[mlir][nfc] GpuToROCDL: Remove some dead code" (PR #121402)
Ivan Butygin
llvmlistbot at llvm.org
Tue Dec 31 07:54:59 PST 2024
https://github.com/Hardcode84 created https://github.com/llvm/llvm-project/pull/121402
Reverts llvm/llvm-project#121395
>From 7b713e8f46465186c777b4822f612bce20396e79 Mon Sep 17 00:00:00 2001
From: Ivan Butygin <ibutygin at amd.com>
Date: Tue, 31 Dec 2024 18:54:48 +0300
Subject: [PATCH] Revert "[mlir][nfc] GpuToROCDL: Remove some dead code
(#121395)"
This reverts commit 0b08e095cc05288d1209cf051988621f6935c940.
---
.../Conversion/GPUToROCDL/LowerGpuOpsToROCDLOps.cpp | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/mlir/lib/Conversion/GPUToROCDL/LowerGpuOpsToROCDLOps.cpp b/mlir/lib/Conversion/GPUToROCDL/LowerGpuOpsToROCDLOps.cpp
index a1cefe289a696f..d52a86987b1cef 100644
--- a/mlir/lib/Conversion/GPUToROCDL/LowerGpuOpsToROCDLOps.cpp
+++ b/mlir/lib/Conversion/GPUToROCDL/LowerGpuOpsToROCDLOps.cpp
@@ -47,6 +47,7 @@
#include "../GPUCommon/GPUOpsLowering.h"
#include "../GPUCommon/IndexIntrinsicsOpLowering.h"
+#include "../GPUCommon/OpToFuncCallLowering.h"
namespace mlir {
#define GEN_PASS_DEF_CONVERTGPUOPSTOROCDLOPS
@@ -345,6 +346,16 @@ void mlir::configureGpuToROCDLConversionLegality(ConversionTarget &target) {
target.addLegalOp<gpu::YieldOp, gpu::GPUModuleOp>();
}
+template <typename OpTy>
+static void populateOpPatterns(const LLVMTypeConverter &converter,
+ RewritePatternSet &patterns, StringRef f32Func,
+ StringRef f64Func, StringRef f32ApproxFunc,
+ StringRef f16Func) {
+ patterns.add<ScalarizeVectorOpLowering<OpTy>>(converter);
+ patterns.add<OpToFuncCallLowering<OpTy>>(converter, f32Func, f32ApproxFunc,
+ f16Func);
+}
+
void mlir::populateGpuToROCDLConversionPatterns(
const LLVMTypeConverter &converter, RewritePatternSet &patterns,
mlir::gpu::amd::Runtime runtime) {
More information about the Mlir-commits
mailing list