From: Lei Zhang Date: Mon, 5 Dec 2022 22:40:39 +0000 (+0000) Subject: [mlir] List more elementwise ops in VectorToGPU MMA conversion X-Git-Tag: upstream/17.0.6~25212 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=50882b4daf77b9d93e025f804b0855c94a83f237;p=platform%2Fupstream%2Fllvm.git [mlir] List more elementwise ops in VectorToGPU MMA conversion Reviewed By: ThomasRaoux Differential Revision: https://reviews.llvm.org/D139244 --- diff --git a/mlir/lib/Conversion/VectorToGPU/VectorToGPU.cpp b/mlir/lib/Conversion/VectorToGPU/VectorToGPU.cpp index 9379134..85492f0 100644 --- a/mlir/lib/Conversion/VectorToGPU/VectorToGPU.cpp +++ b/mlir/lib/Conversion/VectorToGPU/VectorToGPU.cpp @@ -191,12 +191,26 @@ convertElementwiseOpToMMA(Operation *op) { return gpu::MMAElementwiseOp::ADDF; if (isa(op)) return gpu::MMAElementwiseOp::MULF; + if (isa(op)) + return gpu::MMAElementwiseOp::SUBF; if (isa(op)) return gpu::MMAElementwiseOp::MAXF; if (isa(op)) return gpu::MMAElementwiseOp::MINF; if (isa(op)) return gpu::MMAElementwiseOp::DIVF; + if (isa(op)) + return gpu::MMAElementwiseOp::ADDI; + if (isa(op)) + return gpu::MMAElementwiseOp::MULI; + if (isa(op)) + return gpu::MMAElementwiseOp::SUBI; + if (isa(op)) + return gpu::MMAElementwiseOp::DIVS; + if (isa(op)) + return gpu::MMAElementwiseOp::DIVU; + if (isa(op)) + return gpu::MMAElementwiseOp::NEGATEF; return std::nullopt; }