From 5248047c939627902bfcdf3d1f6bf1d8716e1483 Mon Sep 17 00:00:00 2001 From: Adrian Kuegel Date: Wed, 11 Nov 2020 14:14:43 +0100 Subject: [PATCH] MLIR: add SinOp Lowering to __ocml_sin_f32 and __ocml_sin_f64 This mimics the recent similar patch for GPUToNVVM. Differential Revision: https://reviews.llvm.org/D91252 --- mlir/lib/Conversion/GPUToROCDL/LowerGpuOpsToROCDLOps.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mlir/lib/Conversion/GPUToROCDL/LowerGpuOpsToROCDLOps.cpp b/mlir/lib/Conversion/GPUToROCDL/LowerGpuOpsToROCDLOps.cpp index 489891e..c321d8e 100644 --- a/mlir/lib/Conversion/GPUToROCDL/LowerGpuOpsToROCDLOps.cpp +++ b/mlir/lib/Conversion/GPUToROCDL/LowerGpuOpsToROCDLOps.cpp @@ -72,7 +72,7 @@ struct LowerGpuOpsToROCDLOpsPass target.addIllegalDialect(); target.addIllegalOp(); + LLVM::Log2Op, LLVM::SinOp, LLVM::TanhOp>(); target.addIllegalOp(); target.addLegalDialect(); // TODO: Remove once we support replacing non-root ops. @@ -113,6 +113,8 @@ void mlir::populateGpuToROCDLConversionPatterns( "__ocml_log10_f64"); patterns.insert>(converter, "__ocml_log2_f32", "__ocml_log2_f64"); + patterns.insert>(converter, "__ocml_sin_f32", + "__ocml_sin_f64"); patterns.insert>(converter, "__ocml_tanh_f32", "__ocml_tanh_f64"); } -- 2.7.4